mexca.container

Containers of pipeline components.

Module Contents

Classes

BaseContainer

Base class for container components. Only for internal use.

FaceExtractorContainer

Container for FaceExtractor component.

SpeakerIdentifierContainer

Container for SpeakerIdentifier component.

VoiceExtractorContainer

Container for VoiceExtractor component.

AudioTranscriberContainer

Container for AudioTrascriber component.

SentimentExtractorContainer

Container for SentimentExtractor component.

class mexca.container.BaseContainer(image_name: str, get_latest_tag: bool = False)[source]

Base class for container components. Only for internal use.

Parameters:
  • image_name (str) – Name of docker image. A tag is automatically added from the package version.

  • get_latest_tag (bool, default=False) – Whether to pull the latest version of the container instead of the version matching the package version. This is mainly useful for debugging.

class mexca.container.FaceExtractorContainer(num_faces: int | None, min_face_size: int = 20, thresholds: Tuple[float] = (0.6, 0.7, 0.7), factor: float = 0.709, post_process: bool = True, select_largest: bool = True, selection_method: str | None = None, keep_all: bool = True, device: torch.device | None = 'cpu', embeddings_model: str = 'vggface2', image_name: str = 'mexca/face-extractor', get_latest_tag: bool = False)[source]

Container for FaceExtractor component.

Parameters:

image_name (str, default='mexca-face-extractor') – Name of the image to create a container from. Pulls the image from Docker Hub if not found locally.

See also

FaceExtractor

class mexca.container.SpeakerIdentifierContainer(num_speakers: int | None = None, use_auth_token: bool | str = True, image_name: str = 'mexca/speaker-identifier', get_latest_tag: bool = False)[source]

Container for SpeakerIdentifier component.

Parameters:

image_name (str, default='mexca-speaker-identifier') – Name of the image to create a container from. Pulls the image from Docker Hub if not found locally.

See also

SpeakerIdentifier

class mexca.container.VoiceExtractorContainer(config: mexca.data.VoiceFeaturesConfig | None = None, image_name: str = 'mexca/voice-extractor', get_latest_tag: bool = False)[source]

Container for VoiceExtractor component.

Parameters:
  • config (VoiceFeaturesConfig, optional, default=None) – Voice feature extraction configuration object. If None, uses VoiceFeaturesConfig’s default configuration.

  • image_name (str, default='mexca-voice-extractor') – Name of the image to create a container from. Pulls the image from Docker Hub if not found locally.

See also

VoiceExtractor

class mexca.container.AudioTranscriberContainer(whisper_model: str | None = 'small', device: str | torch.device | None = 'cpu', sentence_rule: str | None = None, image_name: str = 'mexca/audio-transcriber', get_latest_tag: bool = False)[source]

Container for AudioTrascriber component.

Parameters:

image_name (str, default='mexca-audio-transcriber') – Name of the image to create a container from. Pulls the image from Docker Hub if not found locally.

See also

AudioTranscriber

class mexca.container.SentimentExtractorContainer(image_name: str = 'mexca/sentiment-extractor', get_latest_tag: bool = False)[source]

Container for SentimentExtractor component.

Parameters:

image_name (str, default='mexca-sentiment-extractor') – Name of the image to create a container from. Pulls the image from Docker Hub if not found locally.

See also

SentimentExtractor