diff --git a/src/pipecat/services/assemblyai/stt.py b/src/pipecat/services/assemblyai/stt.py index a75327300..3d10c970f 100644 --- a/src/pipecat/services/assemblyai/stt.py +++ b/src/pipecat/services/assemblyai/stt.py @@ -81,7 +81,7 @@ def map_language_from_assemblyai(language_code: str) -> Language: @dataclass class AssemblyAISTTSettings(STTSettings): - """Settings for the AssemblyAI STT service. + """Settings for AssemblyAISTTService. Parameters: formatted_finals: Whether to enable transcript formatting. diff --git a/src/pipecat/services/aws/stt.py b/src/pipecat/services/aws/stt.py index f2ce79c29..879fa99ab 100644 --- a/src/pipecat/services/aws/stt.py +++ b/src/pipecat/services/aws/stt.py @@ -47,7 +47,7 @@ except ModuleNotFoundError as e: @dataclass class AWSTranscribeSTTSettings(STTSettings): - """Settings for the AWS Transcribe STT service.""" + """Settings for AWSTranscribeSTTService.""" pass diff --git a/src/pipecat/services/azure/stt.py b/src/pipecat/services/azure/stt.py index 8e6204c5e..c1db76b82 100644 --- a/src/pipecat/services/azure/stt.py +++ b/src/pipecat/services/azure/stt.py @@ -53,7 +53,7 @@ except ModuleNotFoundError as e: @dataclass class AzureSTTSettings(STTSettings): - """Settings for the Azure STT service.""" + """Settings for AzureSTTService.""" pass diff --git a/src/pipecat/services/cartesia/stt.py b/src/pipecat/services/cartesia/stt.py index 67416016e..cdf46d50a 100644 --- a/src/pipecat/services/cartesia/stt.py +++ b/src/pipecat/services/cartesia/stt.py @@ -46,7 +46,7 @@ except ModuleNotFoundError as e: @dataclass class CartesiaSTTSettings(STTSettings): - """Settings for the Cartesia STT service.""" + """Settings for CartesiaSTTService.""" pass diff --git a/src/pipecat/services/deepgram/flux/stt.py b/src/pipecat/services/deepgram/flux/stt.py index 678d373b4..1ed28a749 100644 --- a/src/pipecat/services/deepgram/flux/stt.py +++ b/src/pipecat/services/deepgram/flux/stt.py @@ -71,7 +71,7 @@ class FluxEventType(str, Enum): @dataclass class DeepgramFluxSTTSettings(STTSettings): - """Settings for the Deepgram Flux STT service. + """Settings for DeepgramFluxSTTService. Parameters: eager_eot_threshold: EagerEndOfTurn/TurnResumed threshold. Off by default. diff --git a/src/pipecat/services/deepgram/stt.py b/src/pipecat/services/deepgram/stt.py index d377fe69a..caa6233b3 100644 --- a/src/pipecat/services/deepgram/stt.py +++ b/src/pipecat/services/deepgram/stt.py @@ -177,7 +177,7 @@ class LiveOptions: @dataclass class DeepgramSTTSettings(STTSettings): - """Settings for Deepgram STT services. + """Settings for DeepgramSTTService. ``model`` and ``language`` are inherited from ``STTSettings`` / ``ServiceSettings``. Additional Deepgram connection params may diff --git a/src/pipecat/services/elevenlabs/stt.py b/src/pipecat/services/elevenlabs/stt.py index 6c21a9d20..230e8a368 100644 --- a/src/pipecat/services/elevenlabs/stt.py +++ b/src/pipecat/services/elevenlabs/stt.py @@ -179,7 +179,7 @@ class CommitStrategy(str, Enum): @dataclass class ElevenLabsSTTSettings(STTSettings): - """Settings for the ElevenLabs file-based STT service. + """Settings for ElevenLabsSTTService. Parameters: tag_audio_events: Whether to include audio events like (laughter), @@ -191,7 +191,7 @@ class ElevenLabsSTTSettings(STTSettings): @dataclass class ElevenLabsRealtimeSTTSettings(STTSettings): - """Settings for the ElevenLabs Realtime STT service. + """Settings for ElevenLabsRealtimeSTTService. See ``ElevenLabsRealtimeSTTService.InputParams`` for detailed descriptions. diff --git a/src/pipecat/services/fal/stt.py b/src/pipecat/services/fal/stt.py index 54aa750b4..92e97d381 100644 --- a/src/pipecat/services/fal/stt.py +++ b/src/pipecat/services/fal/stt.py @@ -143,7 +143,7 @@ def language_to_fal_language(language: Language) -> Optional[str]: @dataclass class FalSTTSettings(STTSettings): - """Settings for the Fal Wizper STT service.""" + """Settings for FalSTTService.""" pass diff --git a/src/pipecat/services/gladia/stt.py b/src/pipecat/services/gladia/stt.py index f1eca2dc2..144f37fb2 100644 --- a/src/pipecat/services/gladia/stt.py +++ b/src/pipecat/services/gladia/stt.py @@ -188,7 +188,7 @@ class _InputParamsDescriptor: @dataclass class GladiaSTTSettings(STTSettings): - """Settings for Gladia STT service. + """Settings for GladiaSTTService. Parameters: language_config: Language detection and handling configuration. diff --git a/src/pipecat/services/google/stt.py b/src/pipecat/services/google/stt.py index 6ac0d6440..131d0e9d1 100644 --- a/src/pipecat/services/google/stt.py +++ b/src/pipecat/services/google/stt.py @@ -360,7 +360,7 @@ def language_to_google_stt_language(language: Language) -> Optional[str]: @dataclass class GoogleSTTSettings(STTSettings): - """Settings for Google Cloud Speech-to-Text V2. + """Settings for GoogleSTTService. Parameters: languages: List of ``Language`` enums for recognition diff --git a/src/pipecat/services/google/tts.py b/src/pipecat/services/google/tts.py index a937e2588..984989fa5 100644 --- a/src/pipecat/services/google/tts.py +++ b/src/pipecat/services/google/tts.py @@ -482,7 +482,7 @@ def language_to_gemini_tts_language(language: Language) -> Optional[str]: @dataclass class GoogleHttpTTSSettings(TTSSettings): - """Settings for Google HTTP TTS service. + """Settings for GoogleHttpTTSService. Parameters: pitch: Voice pitch adjustment (e.g., "+2st", "-50%"). @@ -513,7 +513,7 @@ class GoogleHttpTTSSettings(TTSSettings): @dataclass class GoogleTTSSettings(TTSSettings): - """Settings for Google streaming TTS service. + """Settings for GoogleTTSService. Parameters: speaking_rate: The speaking rate, in the range [0.25, 2.0]. @@ -522,9 +522,14 @@ class GoogleTTSSettings(TTSSettings): speaking_rate: float | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) +#: .. deprecated:: 0.0.105 +#: Use ``GoogleTTSSettings`` instead. +GoogleStreamTTSSettings = GoogleTTSSettings + + @dataclass class GeminiTTSSettings(TTSSettings): - """Settings for Gemini TTS service. + """Settings for GeminiTTSService. Parameters: prompt: Optional style instructions for how to synthesize the content. diff --git a/src/pipecat/services/gradium/stt.py b/src/pipecat/services/gradium/stt.py index e8ab072d0..2a912c355 100644 --- a/src/pipecat/services/gradium/stt.py +++ b/src/pipecat/services/gradium/stt.py @@ -68,7 +68,7 @@ def language_to_gradium_language(language: Language) -> Optional[str]: @dataclass class GradiumSTTSettings(STTSettings): - """Settings for the Gradium STT service.""" + """Settings for GradiumSTTService.""" pass diff --git a/src/pipecat/services/nvidia/stt.py b/src/pipecat/services/nvidia/stt.py index 6823965a9..3d6d2391e 100644 --- a/src/pipecat/services/nvidia/stt.py +++ b/src/pipecat/services/nvidia/stt.py @@ -93,14 +93,14 @@ def language_to_nvidia_riva_language(language: Language) -> Optional[str]: @dataclass class NvidiaSTTSettings(STTSettings): - """Settings for the NVIDIA Riva streaming STT service.""" + """Settings for NvidiaSTTService.""" pass @dataclass class NvidiaSegmentedSTTSettings(STTSettings): - """Settings for the NVIDIA Riva segmented STT service. + """Settings for NvidiaSegmentedSTTService. Parameters: profanity_filter: Whether to filter profanity from results. diff --git a/src/pipecat/services/openai/stt.py b/src/pipecat/services/openai/stt.py index 0e1e4f594..a6d7beb0c 100644 --- a/src/pipecat/services/openai/stt.py +++ b/src/pipecat/services/openai/stt.py @@ -182,7 +182,7 @@ _OPENAI_SAMPLE_RATE = 24000 @dataclass class OpenAIRealtimeSTTSettings(STTSettings): - """Settings for the OpenAI Realtime STT service. + """Settings for OpenAIRealtimeSTTService. Parameters: prompt: Optional prompt text to guide transcription style. diff --git a/src/pipecat/services/sarvam/stt.py b/src/pipecat/services/sarvam/stt.py index 8581a7463..3e4136c41 100644 --- a/src/pipecat/services/sarvam/stt.py +++ b/src/pipecat/services/sarvam/stt.py @@ -139,7 +139,7 @@ MODEL_CONFIGS: Dict[str, ModelConfig] = { @dataclass class SarvamSTTSettings(STTSettings): - """Settings for the Sarvam STT service. + """Settings for SarvamSTTService. Parameters: prompt: Optional prompt to guide transcription/translation style/context. diff --git a/src/pipecat/services/soniox/stt.py b/src/pipecat/services/soniox/stt.py index 483cad062..85277a41b 100644 --- a/src/pipecat/services/soniox/stt.py +++ b/src/pipecat/services/soniox/stt.py @@ -141,7 +141,7 @@ def _prepare_language_hints( @dataclass class SonioxSTTSettings(STTSettings): - """Settings for Soniox STT service. + """Settings for SonioxSTTService. Parameters: language_hints: List of language hints to use for transcription. diff --git a/src/pipecat/services/speechmatics/stt.py b/src/pipecat/services/speechmatics/stt.py index 2500dd712..e3100a2ad 100644 --- a/src/pipecat/services/speechmatics/stt.py +++ b/src/pipecat/services/speechmatics/stt.py @@ -85,7 +85,7 @@ class TurnDetectionMode(str, Enum): @dataclass class SpeechmaticsSTTSettings(STTSettings): - """Settings for Speechmatics STT service. + """Settings for SpeechmaticsSTTService. See ``SpeechmaticsSTTService.InputParams`` for detailed descriptions of each field. @@ -493,6 +493,12 @@ class SpeechmaticsSTTService(STTService): if settings is not None: default_settings.apply_update(settings) + # Build SDK config from settings, set model name before calling super + self._client: VoiceAgentClient | None = None + self._audio_encoding = encoding + self._config: VoiceAgentConfig = self._build_config(default_settings) + default_settings.model = self._config.operating_point.value + super().__init__( sample_rate=sample_rate, ttfs_p99_latency=ttfs_p99_latency, @@ -500,13 +506,6 @@ class SpeechmaticsSTTService(STTService): **kwargs, ) - # Build SDK config from settings, then resolve model from operating_point - self._client: VoiceAgentClient | None = None - self._audio_encoding = encoding - self._config: VoiceAgentConfig = self._build_config(self._settings) - self._settings.model = self._config.operating_point.value - self._sync_model_name_to_metrics() - # Outbound frame queue self._outbound_frames: asyncio.Queue[Frame] = asyncio.Queue() diff --git a/src/pipecat/services/whisper/base_stt.py b/src/pipecat/services/whisper/base_stt.py index 13de0f251..a3bb98548 100644 --- a/src/pipecat/services/whisper/base_stt.py +++ b/src/pipecat/services/whisper/base_stt.py @@ -28,7 +28,7 @@ from pipecat.utils.tracing.service_decorators import traced_stt @dataclass class BaseWhisperSTTSettings(STTSettings): - """Settings for Whisper API-based STT services. + """Settings for BaseWhisperSTTService. Parameters: prompt: Optional text to guide the model's style or continue diff --git a/src/pipecat/services/whisper/stt.py b/src/pipecat/services/whisper/stt.py index af96f92c0..ab5354e2c 100644 --- a/src/pipecat/services/whisper/stt.py +++ b/src/pipecat/services/whisper/stt.py @@ -176,7 +176,7 @@ def language_to_whisper_language(language: Language) -> Optional[str]: @dataclass class WhisperSTTSettings(STTSettings): - """Settings for the local Whisper (Faster Whisper) STT service. + """Settings for WhisperSTTService. Parameters: no_speech_prob: Probability threshold for filtering non-speech segments. @@ -187,7 +187,7 @@ class WhisperSTTSettings(STTSettings): @dataclass class WhisperMLXSTTSettings(STTSettings): - """Settings for the MLX Whisper STT service. + """Settings for WhisperMLXSTTService. Parameters: no_speech_prob: Probability threshold for filtering non-speech segments.