Config

class pipecat.services.gladia.config.LanguageConfig(*, languages=None, code_switching=None)[source]

Bases: BaseModel

Configuration for language detection and handling.

Parameters:
  • languages (List[str] | None)

  • code_switching (bool | None)

languages

List of language codes to use for transcription

Type:

List[str] | None

code_switching

Whether to auto-detect language changes during transcription

Type:

bool | None

languages: List[str] | None
code_switching: bool | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class pipecat.services.gladia.config.PreProcessingConfig(*, speech_threshold=None)[source]

Bases: BaseModel

Configuration for audio pre-processing options.

Parameters:

speech_threshold (float | None)

speech_threshold

Sensitivity for speech detection (0-1)

Type:

float | None

speech_threshold: float | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class pipecat.services.gladia.config.CustomVocabularyItem(*, value, intensity)[source]

Bases: BaseModel

Represents a custom vocabulary item with an intensity value.

Parameters:
  • value (str)

  • intensity (float)

value

The vocabulary word or phrase

Type:

str

intensity

The bias intensity for this vocabulary item (0-1)

Type:

float

value: str
intensity: float
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class pipecat.services.gladia.config.CustomVocabularyConfig(*, vocabulary=None, default_intensity=None)[source]

Bases: BaseModel

Configuration for custom vocabulary.

Parameters:
  • vocabulary (List[str | CustomVocabularyItem] | None)

  • default_intensity (float | None)

vocabulary

List of words/phrases or CustomVocabularyItem objects

Type:

List[str | pipecat.services.gladia.config.CustomVocabularyItem] | None

default_intensity

Default intensity for simple string vocabulary items

Type:

float | None

vocabulary: List[str | CustomVocabularyItem] | None
default_intensity: float | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class pipecat.services.gladia.config.CustomSpellingConfig(*, spelling_dictionary=None)[source]

Bases: BaseModel

Configuration for custom spelling rules.

Parameters:

spelling_dictionary (Dict[str, List[str]] | None)

spelling_dictionary

Mapping of correct spellings to phonetic variations

Type:

Dict[str, List[str]] | None

spelling_dictionary: Dict[str, List[str]] | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class pipecat.services.gladia.config.TranslationConfig(*, target_languages=None, model=None, match_original_utterances=None, lipsync=None, context_adaptation=None, context=None, informal=None)[source]

Bases: BaseModel

Configuration for real-time translation.

Parameters:
  • target_languages (List[str] | None)

  • model (str | None)

  • match_original_utterances (bool | None)

  • lipsync (bool | None)

  • context_adaptation (bool | None)

  • context (str | None)

  • informal (bool | None)

target_languages

List of target language codes for translation

Type:

List[str] | None

model

Translation model to use (“base” or “enhanced”)

Type:

str | None

match_original_utterances

Whether to align translations with original utterances

Type:

bool | None

lipsync

Whether to enable lip-sync optimization for translations

Type:

bool | None

context_adaptation

Whether to enable context-aware translation adaptation

Type:

bool | None

context

Additional context to help with translation accuracy

Type:

str | None

informal

Force informal language forms when available

Type:

bool | None

target_languages: List[str] | None
model: str | None
match_original_utterances: bool | None
lipsync: bool | None
context_adaptation: bool | None
context: str | None
informal: bool | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class pipecat.services.gladia.config.RealtimeProcessingConfig(*, words_accurate_timestamps=None, custom_vocabulary=None, custom_vocabulary_config=None, custom_spelling=None, custom_spelling_config=None, translation=None, translation_config=None, named_entity_recognition=None, sentiment_analysis=None)[source]

Bases: BaseModel

Configuration for real-time processing features.

Parameters:
  • words_accurate_timestamps (bool | None)

  • custom_vocabulary (bool | None)

  • custom_vocabulary_config (CustomVocabularyConfig | None)

  • custom_spelling (bool | None)

  • custom_spelling_config (CustomSpellingConfig | None)

  • translation (bool | None)

  • translation_config (TranslationConfig | None)

  • named_entity_recognition (bool | None)

  • sentiment_analysis (bool | None)

words_accurate_timestamps

Whether to provide per-word timestamps

Type:

bool | None

custom_vocabulary

Whether to enable custom vocabulary

Type:

bool | None

custom_vocabulary_config

Custom vocabulary configuration

Type:

pipecat.services.gladia.config.CustomVocabularyConfig | None

custom_spelling

Whether to enable custom spelling

Type:

bool | None

custom_spelling_config

Custom spelling configuration

Type:

pipecat.services.gladia.config.CustomSpellingConfig | None

translation

Whether to enable translation

Type:

bool | None

translation_config

Translation configuration

Type:

pipecat.services.gladia.config.TranslationConfig | None

named_entity_recognition

Whether to enable named entity recognition

Type:

bool | None

sentiment_analysis

Whether to enable sentiment analysis

Type:

bool | None

words_accurate_timestamps: bool | None
custom_vocabulary: bool | None
custom_vocabulary_config: CustomVocabularyConfig | None
custom_spelling: bool | None
custom_spelling_config: CustomSpellingConfig | None
translation: bool | None
translation_config: TranslationConfig | None
named_entity_recognition: bool | None
sentiment_analysis: bool | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class pipecat.services.gladia.config.MessagesConfig(*, receive_partial_transcripts=None, receive_final_transcripts=None, receive_speech_events=None, receive_pre_processing_events=None, receive_realtime_processing_events=None, receive_post_processing_events=None, receive_acknowledgments=None, receive_errors=None, receive_lifecycle_events=None)[source]

Bases: BaseModel

Configuration for controlling which message types are sent via WebSocket.

Parameters:
  • receive_partial_transcripts (bool | None)

  • receive_final_transcripts (bool | None)

  • receive_speech_events (bool | None)

  • receive_pre_processing_events (bool | None)

  • receive_realtime_processing_events (bool | None)

  • receive_post_processing_events (bool | None)

  • receive_acknowledgments (bool | None)

  • receive_errors (bool | None)

  • receive_lifecycle_events (bool | None)

receive_partial_transcripts

Whether to receive intermediate transcription results

Type:

bool | None

receive_final_transcripts

Whether to receive final transcription results

Type:

bool | None

receive_speech_events

Whether to receive speech begin/end events

Type:

bool | None

receive_pre_processing_events

Whether to receive pre-processing events

Type:

bool | None

receive_realtime_processing_events

Whether to receive real-time processing events

Type:

bool | None

receive_post_processing_events

Whether to receive post-processing events

Type:

bool | None

receive_acknowledgments

Whether to receive acknowledgment messages

Type:

bool | None

receive_errors

Whether to receive error messages

Type:

bool | None

receive_lifecycle_events

Whether to receive lifecycle events

Type:

bool | None

receive_partial_transcripts: bool | None
receive_final_transcripts: bool | None
receive_speech_events: bool | None
receive_pre_processing_events: bool | None
receive_realtime_processing_events: bool | None
receive_post_processing_events: bool | None
receive_acknowledgments: bool | None
receive_errors: bool | None
receive_lifecycle_events: bool | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class pipecat.services.gladia.config.GladiaInputParams(*, encoding='wav/pcm', bit_depth=16, channels=1, custom_metadata=None, endpointing=None, maximum_duration_without_endpointing=10, language=None, language_config=None, pre_processing=None, realtime_processing=None, messages_config=None)[source]

Bases: BaseModel

Configuration parameters for the Gladia STT service.

Parameters:
  • encoding (str | None)

  • bit_depth (int | None)

  • channels (int | None)

  • custom_metadata (Dict[str, Any] | None)

  • endpointing (float | None)

  • maximum_duration_without_endpointing (int | None)

  • language (Language | None)

  • language_config (LanguageConfig | None)

  • pre_processing (PreProcessingConfig | None)

  • realtime_processing (RealtimeProcessingConfig | None)

  • messages_config (MessagesConfig | None)

encoding

Audio encoding format

Type:

str | None

bit_depth

Audio bit depth

Type:

int | None

channels

Number of audio channels

Type:

int | None

custom_metadata

Additional metadata to include with requests

Type:

Dict[str, Any] | None

endpointing

Silence duration in seconds to mark end of speech

Type:

float | None

maximum_duration_without_endpointing

Maximum utterance duration without silence

Type:

int | None

language

DEPRECATED - Use language_config instead

Type:

pipecat.transcriptions.language.Language | None

language_config

Detailed language configuration

Type:

pipecat.services.gladia.config.LanguageConfig | None

pre_processing

Audio pre-processing options

Type:

pipecat.services.gladia.config.PreProcessingConfig | None

realtime_processing

Real-time processing features

Type:

pipecat.services.gladia.config.RealtimeProcessingConfig | None

messages_config

WebSocket message filtering options

Type:

pipecat.services.gladia.config.MessagesConfig | None

encoding: str | None
bit_depth: int | None
channels: int | None
custom_metadata: Dict[str, Any] | None
endpointing: float | None
maximum_duration_without_endpointing: int | None
language: Language | None
language_config: LanguageConfig | None
pre_processing: PreProcessingConfig | None
realtime_processing: RealtimeProcessingConfig | None
messages_config: MessagesConfig | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].