diff --git a/src/pipecat/services/aws/llm.py b/src/pipecat/services/aws/llm.py index bf226d815..5420addf0 100644 --- a/src/pipecat/services/aws/llm.py +++ b/src/pipecat/services/aws/llm.py @@ -67,7 +67,7 @@ class AWSBedrockLLMSettings(LLMSettings): """ stop_sequences: list[str] | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - latency: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + latency: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) enable_prompt_caching: bool | _NotGiven = field(default_factory=lambda: NOT_GIVEN) additional_model_request_fields: dict[str, Any] | _NotGiven = field( default_factory=lambda: NOT_GIVEN diff --git a/src/pipecat/services/aws/tts.py b/src/pipecat/services/aws/tts.py index 93919c860..d49aa796a 100644 --- a/src/pipecat/services/aws/tts.py +++ b/src/pipecat/services/aws/tts.py @@ -133,11 +133,11 @@ class AWSPollyTTSSettings(TTSSettings): lexicon_names: List of pronunciation lexicons to apply. """ - engine: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - pitch: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - rate: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - volume: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - lexicon_names: list[str] | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + engine: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + pitch: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + rate: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + volume: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + lexicon_names: list[str] | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) class AWSPollyTTSService(TTSService): diff --git a/src/pipecat/services/azure/tts.py b/src/pipecat/services/azure/tts.py index 46811a1a3..4e6879d1a 100644 --- a/src/pipecat/services/azure/tts.py +++ b/src/pipecat/services/azure/tts.py @@ -80,13 +80,13 @@ class AzureTTSSettings(TTSSettings): volume: Volume level (e.g., "+20%", "loud", "x-soft"). """ - emphasis: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - pitch: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - rate: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - role: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - style: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - style_degree: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - volume: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + emphasis: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + pitch: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + rate: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + role: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + style: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + style_degree: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + volume: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) class AzureBaseTTSService: diff --git a/src/pipecat/services/google/gemini_live/llm.py b/src/pipecat/services/google/gemini_live/llm.py index b4ced161f..7c0c22933 100644 --- a/src/pipecat/services/google/gemini_live/llm.py +++ b/src/pipecat/services/google/gemini_live/llm.py @@ -342,7 +342,7 @@ class GeminiLiveLLMSettings(LLMSettings): modalities: GeminiModalities | _NotGiven = field(default_factory=lambda: NOT_GIVEN) language: Language | str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) media_resolution: GeminiMediaResolution | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - vad: GeminiVADParams | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + vad: GeminiVADParams | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) context_window_compression: ContextWindowCompressionParams | dict | _NotGiven = field( default_factory=lambda: NOT_GIVEN ) diff --git a/src/pipecat/services/google/llm.py b/src/pipecat/services/google/llm.py index e5e4fd5b6..faba2868b 100644 --- a/src/pipecat/services/google/llm.py +++ b/src/pipecat/services/google/llm.py @@ -107,7 +107,7 @@ class GoogleLLMSettings(LLMSettings): thinking: Thinking configuration. """ - thinking: Union["GoogleLLMService.ThinkingConfig", _NotGiven] = field( + thinking: Union["GoogleLLMService.ThinkingConfig", None, _NotGiven] = field( default_factory=lambda: NOT_GIVEN ) diff --git a/src/pipecat/services/google/stt.py b/src/pipecat/services/google/stt.py index b34056ee2..d9fb0a160 100644 --- a/src/pipecat/services/google/stt.py +++ b/src/pipecat/services/google/stt.py @@ -385,7 +385,7 @@ class GoogleSTTSettings(STTSettings): """ languages: list[Language] | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - language_codes: list[str] | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + language_codes: list[str] | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) use_separate_recognition_per_channel: bool | _NotGiven = field( default_factory=lambda: NOT_GIVEN ) diff --git a/src/pipecat/services/inworld/tts.py b/src/pipecat/services/inworld/tts.py index 33c332384..ef3f0f956 100644 --- a/src/pipecat/services/inworld/tts.py +++ b/src/pipecat/services/inworld/tts.py @@ -72,8 +72,8 @@ class InworldTTSSettings(TTSSettings): temperature: Temperature for speech synthesis. """ - speaking_rate: float | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - temperature: float | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + speaking_rate: float | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + temperature: float | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) _aliases: ClassVar[dict[str, str]] = { "voiceId": "voice", diff --git a/src/pipecat/services/openai/tts.py b/src/pipecat/services/openai/tts.py index 66f027c8d..a0e6a93dd 100644 --- a/src/pipecat/services/openai/tts.py +++ b/src/pipecat/services/openai/tts.py @@ -70,8 +70,8 @@ class OpenAITTSSettings(TTSSettings): speed: Voice speed control (0.25 to 4.0, default 1.0). """ - instructions: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - speed: float | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + instructions: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + speed: float | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) class OpenAITTSService(TTSService): diff --git a/src/pipecat/services/settings.py b/src/pipecat/services/settings.py index 62d6dfd50..b1f7539db 100644 --- a/src/pipecat/services/settings.py +++ b/src/pipecat/services/settings.py @@ -440,7 +440,7 @@ class TTSSettings(ServiceSettings): ``__init__`` methods do the same at construction time. """ - voice: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + voice: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) language: Language | str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) _aliases: ClassVar[dict[str, str]] = {"voice_id": "voice"} diff --git a/src/pipecat/services/speechmatics/stt.py b/src/pipecat/services/speechmatics/stt.py index 2597724bb..836a5668a 100644 --- a/src/pipecat/services/speechmatics/stt.py +++ b/src/pipecat/services/speechmatics/stt.py @@ -114,7 +114,7 @@ class SpeechmaticsSTTSettings(STTSettings): extra_params: Extra parameters for the STT engine. """ - domain: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + domain: str | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) turn_detection_mode: TurnDetectionMode | _NotGiven = field(default_factory=lambda: NOT_GIVEN) speaker_active_format: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) speaker_passive_format: str | _NotGiven = field(default_factory=lambda: NOT_GIVEN) @@ -125,18 +125,22 @@ class SpeechmaticsSTTSettings(STTSettings): additional_vocab: list[AdditionalVocabEntry] | _NotGiven = field( default_factory=lambda: NOT_GIVEN ) - operating_point: OperatingPoint | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - max_delay: float | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - end_of_utterance_silence_trigger: float | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - end_of_utterance_max_delay: float | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - punctuation_overrides: dict[str, Any] | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - include_partials: bool | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - split_sentences: bool | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - enable_diarization: bool | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - speaker_sensitivity: float | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - max_speakers: int | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - prefer_current_speaker: bool | _NotGiven = field(default_factory=lambda: NOT_GIVEN) - extra_params: dict[str, Any] | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + operating_point: OperatingPoint | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + max_delay: float | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + end_of_utterance_silence_trigger: float | None | _NotGiven = field( + default_factory=lambda: NOT_GIVEN + ) + end_of_utterance_max_delay: float | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + punctuation_overrides: dict[str, Any] | None | _NotGiven = field( + default_factory=lambda: NOT_GIVEN + ) + include_partials: bool | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + split_sentences: bool | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + enable_diarization: bool | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + speaker_sensitivity: float | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + max_speakers: int | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + prefer_current_speaker: bool | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) + extra_params: dict[str, Any] | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN) #: Fields that can be updated on a live connection via the Speechmatics #: diarization-config API — no reconnect needed. diff --git a/src/pipecat/services/ultravox/llm.py b/src/pipecat/services/ultravox/llm.py index c1cd8d750..967dc7886 100644 --- a/src/pipecat/services/ultravox/llm.py +++ b/src/pipecat/services/ultravox/llm.py @@ -67,7 +67,7 @@ class UltravoxRealtimeLLMSettings(LLMSettings): output_medium: The output medium for the model ("voice" or "text"). """ - output_medium: str | _NotGiven = field(default=NOT_GIVEN) + output_medium: str | None | _NotGiven = field(default=NOT_GIVEN) class AgentInputParams(BaseModel):