From 26631a9c31771849cfde62489888189dbe5e6dcf Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Sat, 7 Mar 2026 08:17:40 -0500 Subject: [PATCH 1/3] Add Settings class attribute alias to all service classes Add a `Settings` class-level alias on every STT, LLM, TTS, image, vision, and video service class pointing to its settings dataclass. This lets developers discover the right settings class via the service class itself (e.g. `GoogleSTTService.Settings(...)`) without needing to know or import the separate settings class name. --- src/pipecat/services/anthropic/llm.py | 1 + src/pipecat/services/assemblyai/stt.py | 1 + src/pipecat/services/asyncai/tts.py | 2 ++ src/pipecat/services/aws/llm.py | 1 + src/pipecat/services/aws/nova_sonic/llm.py | 1 + src/pipecat/services/aws/stt.py | 1 + src/pipecat/services/aws/tts.py | 3 +++ src/pipecat/services/azure/image.py | 1 + src/pipecat/services/azure/llm.py | 2 ++ src/pipecat/services/azure/realtime/llm.py | 1 + src/pipecat/services/azure/stt.py | 1 + src/pipecat/services/azure/tts.py | 4 ++++ src/pipecat/services/camb/tts.py | 1 + src/pipecat/services/cartesia/stt.py | 1 + src/pipecat/services/cartesia/tts.py | 2 ++ src/pipecat/services/cerebras/llm.py | 1 + src/pipecat/services/deepgram/flux/stt.py | 1 + src/pipecat/services/deepgram/sagemaker/stt.py | 1 + src/pipecat/services/deepgram/sagemaker/tts.py | 1 + src/pipecat/services/deepgram/stt.py | 1 + src/pipecat/services/deepgram/tts.py | 2 ++ src/pipecat/services/deepseek/llm.py | 1 + src/pipecat/services/elevenlabs/stt.py | 2 ++ src/pipecat/services/elevenlabs/tts.py | 2 ++ src/pipecat/services/fal/image.py | 3 +++ src/pipecat/services/fal/stt.py | 1 + src/pipecat/services/fireworks/llm.py | 1 + src/pipecat/services/fish/tts.py | 1 + src/pipecat/services/gladia/stt.py | 1 + src/pipecat/services/google/gemini_live/llm.py | 1 + src/pipecat/services/google/gemini_live/llm_vertex.py | 1 + src/pipecat/services/google/image.py | 5 +++-- src/pipecat/services/google/llm.py | 1 + src/pipecat/services/google/llm_openai.py | 1 + src/pipecat/services/google/llm_vertex.py | 1 + src/pipecat/services/google/stt.py | 1 + src/pipecat/services/google/tts.py | 3 +++ src/pipecat/services/gradium/stt.py | 1 + src/pipecat/services/gradium/tts.py | 1 + src/pipecat/services/grok/llm.py | 1 + src/pipecat/services/grok/realtime/llm.py | 1 + src/pipecat/services/groq/llm.py | 1 + src/pipecat/services/groq/stt.py | 1 + src/pipecat/services/groq/tts.py | 1 + src/pipecat/services/heygen/video.py | 3 +++ src/pipecat/services/hume/tts.py | 1 + src/pipecat/services/inworld/tts.py | 2 ++ src/pipecat/services/kokoro/tts.py | 1 + src/pipecat/services/lmnt/tts.py | 1 + src/pipecat/services/minimax/tts.py | 1 + src/pipecat/services/mistral/llm.py | 1 + src/pipecat/services/moondream/vision.py | 3 +++ src/pipecat/services/neuphonic/tts.py | 2 ++ src/pipecat/services/nvidia/llm.py | 1 + src/pipecat/services/nvidia/stt.py | 2 ++ src/pipecat/services/nvidia/tts.py | 1 + src/pipecat/services/ollama/llm.py | 1 + src/pipecat/services/openai/base_llm.py | 1 + src/pipecat/services/openai/image.py | 1 + src/pipecat/services/openai/realtime/llm.py | 1 + src/pipecat/services/openai/stt.py | 2 ++ src/pipecat/services/openai/tts.py | 1 + src/pipecat/services/openai_realtime_beta/azure.py | 1 + src/pipecat/services/openai_realtime_beta/openai.py | 1 + src/pipecat/services/openpipe/llm.py | 1 + src/pipecat/services/openrouter/llm.py | 1 + src/pipecat/services/perplexity/llm.py | 1 + src/pipecat/services/piper/tts.py | 2 ++ src/pipecat/services/qwen/llm.py | 1 + src/pipecat/services/resembleai/tts.py | 1 + src/pipecat/services/rime/tts.py | 3 +++ src/pipecat/services/sambanova/llm.py | 1 + src/pipecat/services/sambanova/stt.py | 2 ++ src/pipecat/services/sarvam/stt.py | 1 + src/pipecat/services/sarvam/tts.py | 2 ++ src/pipecat/services/soniox/stt.py | 1 + src/pipecat/services/speechmatics/stt.py | 1 + src/pipecat/services/speechmatics/tts.py | 1 + src/pipecat/services/tavus/video.py | 3 +++ src/pipecat/services/together/llm.py | 1 + src/pipecat/services/ultravox/llm.py | 1 + src/pipecat/services/whisper/base_stt.py | 1 + src/pipecat/services/whisper/stt.py | 2 ++ src/pipecat/services/xtts/tts.py | 1 + 84 files changed, 117 insertions(+), 2 deletions(-) diff --git a/src/pipecat/services/anthropic/llm.py b/src/pipecat/services/anthropic/llm.py index f687b56c5..7abcec3e0 100644 --- a/src/pipecat/services/anthropic/llm.py +++ b/src/pipecat/services/anthropic/llm.py @@ -159,6 +159,7 @@ class AnthropicLLMService(LLMService): Can use custom clients like AsyncAnthropicBedrock and AsyncAnthropicVertex. """ + Settings = AnthropicLLMSettings _settings: AnthropicLLMSettings # Overriding the default adapter to use the Anthropic one. diff --git a/src/pipecat/services/assemblyai/stt.py b/src/pipecat/services/assemblyai/stt.py index 3d10c970f..ddfcb4a47 100644 --- a/src/pipecat/services/assemblyai/stt.py +++ b/src/pipecat/services/assemblyai/stt.py @@ -128,6 +128,7 @@ class AssemblyAISTTService(WebsocketSTTService): for audio processing and connection management. """ + Settings = AssemblyAISTTSettings _settings: AssemblyAISTTSettings def __init__( diff --git a/src/pipecat/services/asyncai/tts.py b/src/pipecat/services/asyncai/tts.py index 7bcc1fdb1..67f79dbfd 100644 --- a/src/pipecat/services/asyncai/tts.py +++ b/src/pipecat/services/asyncai/tts.py @@ -85,6 +85,7 @@ class AsyncAITTSService(WebsocketTTSService): Provides text-to-speech using Async's streaming WebSocket API. """ + Settings = AsyncAITTSSettings _settings: AsyncAITTSSettings class InputParams(BaseModel): @@ -485,6 +486,7 @@ class AsyncAIHttpTTSService(TTSService): connection is not required or desired. """ + Settings = AsyncAITTSSettings _settings: AsyncAITTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/aws/llm.py b/src/pipecat/services/aws/llm.py index bcc5028c4..168a2a98f 100644 --- a/src/pipecat/services/aws/llm.py +++ b/src/pipecat/services/aws/llm.py @@ -746,6 +746,7 @@ class AWSBedrockLLMService(LLMService): vision capabilities. """ + Settings = AWSBedrockLLMSettings _settings: AWSBedrockLLMSettings # Overriding the default adapter to use the Anthropic one. diff --git a/src/pipecat/services/aws/nova_sonic/llm.py b/src/pipecat/services/aws/nova_sonic/llm.py index fa69a9c8a..8e4633544 100644 --- a/src/pipecat/services/aws/nova_sonic/llm.py +++ b/src/pipecat/services/aws/nova_sonic/llm.py @@ -246,6 +246,7 @@ class AWSNovaSonicLLMService(LLMService): and function calling capabilities using AWS Nova Sonic model. """ + Settings = AWSNovaSonicLLMSettings _settings: AWSNovaSonicLLMSettings # Override the default adapter to use the AWSNovaSonicLLMAdapter one diff --git a/src/pipecat/services/aws/stt.py b/src/pipecat/services/aws/stt.py index 7355bb1b7..8b28c006a 100644 --- a/src/pipecat/services/aws/stt.py +++ b/src/pipecat/services/aws/stt.py @@ -60,6 +60,7 @@ class AWSTranscribeSTTService(WebsocketSTTService): final transcription results. """ + Settings = AWSTranscribeSTTSettings _settings: AWSTranscribeSTTSettings def __init__( diff --git a/src/pipecat/services/aws/tts.py b/src/pipecat/services/aws/tts.py index 12eab245c..47b12429a 100644 --- a/src/pipecat/services/aws/tts.py +++ b/src/pipecat/services/aws/tts.py @@ -148,6 +148,7 @@ class AWSPollyTTSService(TTSService): options including prosody controls. """ + Settings = AWSPollyTTSSettings _settings: AWSPollyTTSSettings class InputParams(BaseModel): @@ -382,6 +383,8 @@ class PollyTTSService(AWSPollyTTSService): """ + Settings = AWSPollyTTSSettings + def __init__(self, **kwargs): """Initialize the deprecated PollyTTSService. diff --git a/src/pipecat/services/azure/image.py b/src/pipecat/services/azure/image.py index 28ac68bf9..1b62fbfe4 100644 --- a/src/pipecat/services/azure/image.py +++ b/src/pipecat/services/azure/image.py @@ -43,6 +43,7 @@ class AzureImageGenServiceREST(ImageGenService): and automatic image download and processing. """ + Settings = AzureImageGenSettings _settings: AzureImageGenSettings def __init__( diff --git a/src/pipecat/services/azure/llm.py b/src/pipecat/services/azure/llm.py index 1c9960e8a..322ff0b3e 100644 --- a/src/pipecat/services/azure/llm.py +++ b/src/pipecat/services/azure/llm.py @@ -31,6 +31,8 @@ class AzureLLMService(OpenAILLMService): maintaining full compatibility with OpenAI's interface and functionality. """ + Settings = AzureLLMSettings + def __init__( self, *, diff --git a/src/pipecat/services/azure/realtime/llm.py b/src/pipecat/services/azure/realtime/llm.py index bf91d484e..c791af94d 100644 --- a/src/pipecat/services/azure/realtime/llm.py +++ b/src/pipecat/services/azure/realtime/llm.py @@ -35,6 +35,7 @@ class AzureRealtimeLLMService(OpenAIRealtimeLLMService): real-time audio and text communication capabilities as the base OpenAI service. """ + Settings = AzureRealtimeLLMSettings _settings: AzureRealtimeLLMSettings def __init__( diff --git a/src/pipecat/services/azure/stt.py b/src/pipecat/services/azure/stt.py index f940ea9c0..0588cc6cc 100644 --- a/src/pipecat/services/azure/stt.py +++ b/src/pipecat/services/azure/stt.py @@ -66,6 +66,7 @@ class AzureSTTService(STTService): provides real-time transcription results with timing information. """ + Settings = AzureSTTSettings _settings: AzureSTTSettings def __init__( diff --git a/src/pipecat/services/azure/tts.py b/src/pipecat/services/azure/tts.py index c2884b860..1c74c7655 100644 --- a/src/pipecat/services/azure/tts.py +++ b/src/pipecat/services/azure/tts.py @@ -246,6 +246,8 @@ class AzureTTSService(TTSService, AzureBaseTTSService): available for lower latency playback and accurate word-level synchronization. """ + Settings = AzureTTSSettings + def __init__( self, *, @@ -749,6 +751,8 @@ class AzureHttpTTSService(TTSService, AzureBaseTTSService): required and simpler integration is preferred. """ + Settings = AzureTTSSettings + def __init__( self, *, diff --git a/src/pipecat/services/camb/tts.py b/src/pipecat/services/camb/tts.py index 12b33974e..9918b2320 100644 --- a/src/pipecat/services/camb/tts.py +++ b/src/pipecat/services/camb/tts.py @@ -168,6 +168,7 @@ class CambTTSService(TTSService): ) """ + Settings = CambTTSSettings _settings: CambTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/cartesia/stt.py b/src/pipecat/services/cartesia/stt.py index cdf46d50a..9c0924827 100644 --- a/src/pipecat/services/cartesia/stt.py +++ b/src/pipecat/services/cartesia/stt.py @@ -146,6 +146,7 @@ class CartesiaSTTService(WebsocketSTTService): See: https://docs.cartesia.ai/api-reference/stt/stt """ + Settings = CartesiaSTTSettings _settings: CartesiaSTTSettings def __init__( diff --git a/src/pipecat/services/cartesia/tts.py b/src/pipecat/services/cartesia/tts.py index c71a84f41..d41f341ca 100644 --- a/src/pipecat/services/cartesia/tts.py +++ b/src/pipecat/services/cartesia/tts.py @@ -210,6 +210,7 @@ class CartesiaTTSService(WebsocketTTSService): customization options including generation configuration. """ + Settings = CartesiaTTSSettings _settings: CartesiaTTSSettings class InputParams(BaseModel): @@ -681,6 +682,7 @@ class CartesiaHttpTTSService(TTSService): integration is preferred. """ + Settings = CartesiaTTSSettings _settings: CartesiaTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/cerebras/llm.py b/src/pipecat/services/cerebras/llm.py index d8dcf3d08..5d4bc2d14 100644 --- a/src/pipecat/services/cerebras/llm.py +++ b/src/pipecat/services/cerebras/llm.py @@ -31,6 +31,7 @@ class CerebrasLLMService(OpenAILLMService): maintaining full compatibility with OpenAI's interface and functionality. """ + Settings = CerebrasLLMSettings _settings: CerebrasLLMSettings def __init__( diff --git a/src/pipecat/services/deepgram/flux/stt.py b/src/pipecat/services/deepgram/flux/stt.py index 1ed28a749..d31c42d9b 100644 --- a/src/pipecat/services/deepgram/flux/stt.py +++ b/src/pipecat/services/deepgram/flux/stt.py @@ -113,6 +113,7 @@ class DeepgramFluxSTTService(WebsocketSTTService): ... """ + Settings = DeepgramFluxSTTSettings _settings: DeepgramFluxSTTSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/deepgram/sagemaker/stt.py b/src/pipecat/services/deepgram/sagemaker/stt.py index 4f29b227f..812a2701e 100644 --- a/src/pipecat/services/deepgram/sagemaker/stt.py +++ b/src/pipecat/services/deepgram/sagemaker/stt.py @@ -78,6 +78,7 @@ class DeepgramSageMakerSTTService(STTService): ) """ + Settings = DeepgramSageMakerSTTSettings _settings: DeepgramSageMakerSTTSettings def __init__( diff --git a/src/pipecat/services/deepgram/sagemaker/tts.py b/src/pipecat/services/deepgram/sagemaker/tts.py index fa5b1cebd..a40f56713 100644 --- a/src/pipecat/services/deepgram/sagemaker/tts.py +++ b/src/pipecat/services/deepgram/sagemaker/tts.py @@ -67,6 +67,7 @@ class DeepgramSageMakerTTSService(TTSService): ) """ + Settings = DeepgramSageMakerTTSSettings _settings: DeepgramSageMakerTTSSettings def __init__( diff --git a/src/pipecat/services/deepgram/stt.py b/src/pipecat/services/deepgram/stt.py index 14020631b..d8f782f5d 100644 --- a/src/pipecat/services/deepgram/stt.py +++ b/src/pipecat/services/deepgram/stt.py @@ -266,6 +266,7 @@ class DeepgramSTTService(STTService): ... """ + Settings = DeepgramSTTSettings _settings: DeepgramSTTSettings def __init__( diff --git a/src/pipecat/services/deepgram/tts.py b/src/pipecat/services/deepgram/tts.py index 5d6e5ffdc..89bc9ae97 100644 --- a/src/pipecat/services/deepgram/tts.py +++ b/src/pipecat/services/deepgram/tts.py @@ -58,6 +58,7 @@ class DeepgramTTSService(WebsocketTTSService): message for conversational AI use cases. """ + Settings = DeepgramTTSSettings _settings: DeepgramTTSSettings SUPPORTED_ENCODINGS = ("linear16", "mulaw", "alaw") @@ -381,6 +382,7 @@ class DeepgramHttpTTSService(TTSService): configurable sample rates and quality settings. """ + Settings = DeepgramTTSSettings _settings: DeepgramTTSSettings def __init__( diff --git a/src/pipecat/services/deepseek/llm.py b/src/pipecat/services/deepseek/llm.py index 2286a98b2..8fc4b5db8 100644 --- a/src/pipecat/services/deepseek/llm.py +++ b/src/pipecat/services/deepseek/llm.py @@ -31,6 +31,7 @@ class DeepSeekLLMService(OpenAILLMService): maintaining full compatibility with OpenAI's interface and functionality. """ + Settings = DeepSeekLLMSettings _settings: DeepSeekLLMSettings def __init__( diff --git a/src/pipecat/services/elevenlabs/stt.py b/src/pipecat/services/elevenlabs/stt.py index dff501d22..76e854ade 100644 --- a/src/pipecat/services/elevenlabs/stt.py +++ b/src/pipecat/services/elevenlabs/stt.py @@ -216,6 +216,7 @@ class ElevenLabsSTTService(SegmentedSTTService): The service uploads audio files to ElevenLabs and receives transcription results directly. """ + Settings = ElevenLabsSTTSettings _settings: ElevenLabsSTTSettings class InputParams(BaseModel): @@ -448,6 +449,7 @@ class ElevenLabsRealtimeSTTService(WebsocketSTTService): commit transcript segments, providing consistency with other STT services. """ + Settings = ElevenLabsRealtimeSTTSettings _settings: ElevenLabsRealtimeSTTSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/elevenlabs/tts.py b/src/pipecat/services/elevenlabs/tts.py index ae413fd3b..01f3cd516 100644 --- a/src/pipecat/services/elevenlabs/tts.py +++ b/src/pipecat/services/elevenlabs/tts.py @@ -316,6 +316,7 @@ class ElevenLabsTTSService(WebsocketTTSService): customization options including stability, similarity boost, and speed controls. """ + Settings = ElevenLabsTTSSettings _settings: ElevenLabsTTSSettings class InputParams(BaseModel): @@ -904,6 +905,7 @@ class ElevenLabsHttpTTSService(TTSService): connection is not required or desired. """ + Settings = ElevenLabsHttpTTSSettings _settings: ElevenLabsHttpTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/fal/image.py b/src/pipecat/services/fal/image.py index c6fb81003..cb4d646ba 100644 --- a/src/pipecat/services/fal/image.py +++ b/src/pipecat/services/fal/image.py @@ -70,6 +70,9 @@ class FalImageGenService(ImageGenService): parameters for image quality, safety, and format options. """ + Settings = FalImageGenSettings + _settings: FalImageGenSettings + class InputParams(BaseModel): """Input parameters for Fal.ai image generation. diff --git a/src/pipecat/services/fal/stt.py b/src/pipecat/services/fal/stt.py index 92e97d381..692878bf6 100644 --- a/src/pipecat/services/fal/stt.py +++ b/src/pipecat/services/fal/stt.py @@ -155,6 +155,7 @@ class FalSTTService(SegmentedSTTService): segments. It inherits from SegmentedSTTService to handle audio buffering and speech detection. """ + Settings = FalSTTSettings _settings: FalSTTSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/fireworks/llm.py b/src/pipecat/services/fireworks/llm.py index cd7e91504..118090be9 100644 --- a/src/pipecat/services/fireworks/llm.py +++ b/src/pipecat/services/fireworks/llm.py @@ -31,6 +31,7 @@ class FireworksLLMService(OpenAILLMService): maintaining full compatibility with OpenAI's interface and functionality. """ + Settings = FireworksLLMSettings _settings: FireworksLLMSettings def __init__( diff --git a/src/pipecat/services/fish/tts.py b/src/pipecat/services/fish/tts.py index 88e0cc8dd..4974dfa37 100644 --- a/src/pipecat/services/fish/tts.py +++ b/src/pipecat/services/fish/tts.py @@ -84,6 +84,7 @@ class FishAudioTTSService(InterruptibleTTSService): audio generation with interruption handling. """ + Settings = FishAudioTTSSettings _settings: FishAudioTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/gladia/stt.py b/src/pipecat/services/gladia/stt.py index 144f37fb2..fc09d94fc 100644 --- a/src/pipecat/services/gladia/stt.py +++ b/src/pipecat/services/gladia/stt.py @@ -230,6 +230,7 @@ class GladiaSTTService(WebsocketSTTService): Use :class:`~pipecat.services.gladia.config.GladiaInputParams` directly instead. """ + Settings = GladiaSTTSettings _settings: GladiaSTTSettings # Maintain backward compatibility diff --git a/src/pipecat/services/google/gemini_live/llm.py b/src/pipecat/services/google/gemini_live/llm.py index 58dcd2da8..c25caafdd 100644 --- a/src/pipecat/services/google/gemini_live/llm.py +++ b/src/pipecat/services/google/gemini_live/llm.py @@ -642,6 +642,7 @@ class GeminiLiveLLMService(LLMService): responses, and tool usage. """ + Settings = GeminiLiveLLMSettings _settings: GeminiLiveLLMSettings # Overriding the default adapter to use the Gemini one. diff --git a/src/pipecat/services/google/gemini_live/llm_vertex.py b/src/pipecat/services/google/gemini_live/llm_vertex.py index 09aaeebbb..cdfde1660 100644 --- a/src/pipecat/services/google/gemini_live/llm_vertex.py +++ b/src/pipecat/services/google/gemini_live/llm_vertex.py @@ -57,6 +57,7 @@ class GeminiLiveVertexLLMService(GeminiLiveLLMService): responses, and tool usage. """ + Settings = GeminiLiveVertexLLMSettings _settings: GeminiLiveVertexLLMSettings def __init__( diff --git a/src/pipecat/services/google/image.py b/src/pipecat/services/google/image.py index 4c351cc6e..5cf37aa4e 100644 --- a/src/pipecat/services/google/image.py +++ b/src/pipecat/services/google/image.py @@ -59,6 +59,9 @@ class GoogleImageGenService(ImageGenService): prompting for enhanced control over generated content. """ + Settings = GoogleImageGenSettings + _settings: GoogleImageGenSettings + class InputParams(BaseModel): """Configuration parameters for Google image generation. @@ -75,8 +78,6 @@ class GoogleImageGenService(ImageGenService): model: str = Field(default="imagen-3.0-generate-002") negative_prompt: Optional[str] = Field(default=None) - _settings: GoogleImageGenSettings - def __init__( self, *, diff --git a/src/pipecat/services/google/llm.py b/src/pipecat/services/google/llm.py index 06f47bc2e..198e612f0 100644 --- a/src/pipecat/services/google/llm.py +++ b/src/pipecat/services/google/llm.py @@ -743,6 +743,7 @@ class GoogleLLMService(LLMService): expected by the Google AI model. """ + Settings = GoogleLLMSettings _settings: GoogleLLMSettings # Overriding the default adapter to use the Gemini one. diff --git a/src/pipecat/services/google/llm_openai.py b/src/pipecat/services/google/llm_openai.py index 75fc6c54c..cd5e0f060 100644 --- a/src/pipecat/services/google/llm_openai.py +++ b/src/pipecat/services/google/llm_openai.py @@ -58,6 +58,7 @@ class GoogleLLMOpenAIBetaService(OpenAILLMService): https://ai.google.dev/gemini-api/docs/openai """ + Settings = GoogleOpenAILLMSettings _settings: GoogleOpenAILLMSettings def __init__( diff --git a/src/pipecat/services/google/llm_vertex.py b/src/pipecat/services/google/llm_vertex.py index e40f15de6..3901b5d50 100644 --- a/src/pipecat/services/google/llm_vertex.py +++ b/src/pipecat/services/google/llm_vertex.py @@ -59,6 +59,7 @@ class GoogleVertexLLMService(GoogleLLMService): https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference """ + Settings = GoogleVertexLLMSettings _settings: GoogleVertexLLMSettings class InputParams(GoogleLLMService.InputParams): diff --git a/src/pipecat/services/google/stt.py b/src/pipecat/services/google/stt.py index 131d0e9d1..70e51ac3c 100644 --- a/src/pipecat/services/google/stt.py +++ b/src/pipecat/services/google/stt.py @@ -414,6 +414,7 @@ class GoogleSTTService(STTService): ValueError: If project ID is not found in credentials. """ + Settings = GoogleSTTSettings _settings: GoogleSTTSettings # Google Cloud's STT service has a connection time limit of 5 minutes per stream. diff --git a/src/pipecat/services/google/tts.py b/src/pipecat/services/google/tts.py index 984989fa5..d3f7879ad 100644 --- a/src/pipecat/services/google/tts.py +++ b/src/pipecat/services/google/tts.py @@ -558,6 +558,7 @@ class GoogleHttpTTSService(TTSService): Chirp and Journey voices don't support SSML and will use plain text input. """ + Settings = GoogleHttpTTSSettings _settings: GoogleHttpTTSSettings class InputParams(BaseModel): @@ -1020,6 +1021,7 @@ class GoogleTTSService(GoogleBaseTTSService): ) """ + Settings = GoogleTTSSettings _settings: GoogleTTSSettings class InputParams(BaseModel): @@ -1198,6 +1200,7 @@ class GeminiTTSService(GoogleBaseTTSService): ) """ + Settings = GeminiTTSSettings _settings: GeminiTTSSettings GOOGLE_SAMPLE_RATE = 24000 # Google TTS always outputs at 24kHz diff --git a/src/pipecat/services/gradium/stt.py b/src/pipecat/services/gradium/stt.py index 814d478e4..3fddf0470 100644 --- a/src/pipecat/services/gradium/stt.py +++ b/src/pipecat/services/gradium/stt.py @@ -88,6 +88,7 @@ class GradiumSTTService(WebsocketSTTService): for audio processing and connection management. """ + Settings = GradiumSTTSettings _settings: GradiumSTTSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/gradium/tts.py b/src/pipecat/services/gradium/tts.py index 3dd663185..03b4d7008 100644 --- a/src/pipecat/services/gradium/tts.py +++ b/src/pipecat/services/gradium/tts.py @@ -47,6 +47,7 @@ class GradiumTTSSettings(TTSSettings): class GradiumTTSService(WebsocketTTSService): """Text-to-Speech service using Gradium's websocket API.""" + Settings = GradiumTTSSettings _settings: GradiumTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/grok/llm.py b/src/pipecat/services/grok/llm.py index 144d91a16..255ee2cf5 100644 --- a/src/pipecat/services/grok/llm.py +++ b/src/pipecat/services/grok/llm.py @@ -86,6 +86,7 @@ class GrokLLMService(OpenAILLMService): processing and reports final totals. """ + Settings = GrokLLMSettings _settings: GrokLLMSettings def __init__( diff --git a/src/pipecat/services/grok/realtime/llm.py b/src/pipecat/services/grok/realtime/llm.py index 7e252ebf5..30061af4a 100644 --- a/src/pipecat/services/grok/realtime/llm.py +++ b/src/pipecat/services/grok/realtime/llm.py @@ -202,6 +202,7 @@ class GrokRealtimeLLMService(LLMService): - Server-side VAD (Voice Activity Detection) """ + Settings = GrokRealtimeLLMSettings _settings: GrokRealtimeLLMSettings # Use the Grok-specific adapter diff --git a/src/pipecat/services/groq/llm.py b/src/pipecat/services/groq/llm.py index e86c59391..6669c385a 100644 --- a/src/pipecat/services/groq/llm.py +++ b/src/pipecat/services/groq/llm.py @@ -30,6 +30,7 @@ class GroqLLMService(OpenAILLMService): maintaining full compatibility with OpenAI's interface and functionality. """ + Settings = GroqLLMSettings _settings: GroqLLMSettings def __init__( diff --git a/src/pipecat/services/groq/stt.py b/src/pipecat/services/groq/stt.py index 1733831c8..b5d59181a 100644 --- a/src/pipecat/services/groq/stt.py +++ b/src/pipecat/services/groq/stt.py @@ -37,6 +37,7 @@ class GroqSTTService(BaseWhisperSTTService): set via the api_key parameter or GROQ_API_KEY environment variable. """ + Settings = GroqSTTSettings _settings: GroqSTTSettings def __init__( diff --git a/src/pipecat/services/groq/tts.py b/src/pipecat/services/groq/tts.py index 4e56312e5..bb39a9067 100644 --- a/src/pipecat/services/groq/tts.py +++ b/src/pipecat/services/groq/tts.py @@ -51,6 +51,7 @@ class GroqTTSService(TTSService): and output formats. """ + Settings = GroqTTSSettings _settings: GroqTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/heygen/video.py b/src/pipecat/services/heygen/video.py index 18df8ac60..2c42dfc6b 100644 --- a/src/pipecat/services/heygen/video.py +++ b/src/pipecat/services/heygen/video.py @@ -82,6 +82,9 @@ class HeyGenVideoService(AIService): Defaults to using the "Shawn_Therapist_public" avatar with "v2" version. """ + Settings = HeyGenVideoSettings + _settings: HeyGenVideoSettings + def __init__( self, *, diff --git a/src/pipecat/services/hume/tts.py b/src/pipecat/services/hume/tts.py index 135806da7..5eb2db646 100644 --- a/src/pipecat/services/hume/tts.py +++ b/src/pipecat/services/hume/tts.py @@ -78,6 +78,7 @@ class HumeTTSService(TTSService): - Provides metrics for Time To First Byte (TTFB) and TTS usage. """ + Settings = HumeTTSSettings _settings: HumeTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/inworld/tts.py b/src/pipecat/services/inworld/tts.py index 17a0e8040..dc09c0481 100644 --- a/src/pipecat/services/inworld/tts.py +++ b/src/pipecat/services/inworld/tts.py @@ -100,6 +100,7 @@ class InworldHttpTTSService(TTSService): Outputs LINEAR16 audio at configurable sample rates with word-level timestamps. """ + Settings = InworldTTSSettings _settings: InworldTTSSettings class InputParams(BaseModel): @@ -487,6 +488,7 @@ class InworldTTSService(WebsocketTTSService): with word-level timestamps. """ + Settings = InworldTTSSettings _settings: InworldTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/kokoro/tts.py b/src/pipecat/services/kokoro/tts.py index bfc39daed..98f181c6f 100644 --- a/src/pipecat/services/kokoro/tts.py +++ b/src/pipecat/services/kokoro/tts.py @@ -101,6 +101,7 @@ class KokoroTTSService(TTSService): Automatically downloads model files on first use. """ + Settings = KokoroTTSSettings _settings: KokoroTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/lmnt/tts.py b/src/pipecat/services/lmnt/tts.py index f6bf46649..46e5e4697 100644 --- a/src/pipecat/services/lmnt/tts.py +++ b/src/pipecat/services/lmnt/tts.py @@ -88,6 +88,7 @@ class LmntTTSService(InterruptibleTTSService): language settings. """ + Settings = LmntTTSSettings _settings: LmntTTSSettings def __init__( diff --git a/src/pipecat/services/minimax/tts.py b/src/pipecat/services/minimax/tts.py index 1edd8bf78..f62e8d46b 100644 --- a/src/pipecat/services/minimax/tts.py +++ b/src/pipecat/services/minimax/tts.py @@ -140,6 +140,7 @@ class MiniMaxHttpTTSService(TTSService): https://www.minimax.io/platform/document/T2A%20V2?key=66719005a427f0c8a5701643 """ + Settings = MiniMaxTTSSettings _settings: MiniMaxTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/mistral/llm.py b/src/pipecat/services/mistral/llm.py index 8389613e0..9e01a76b5 100644 --- a/src/pipecat/services/mistral/llm.py +++ b/src/pipecat/services/mistral/llm.py @@ -33,6 +33,7 @@ class MistralLLMService(OpenAILLMService): maintaining full compatibility with OpenAI's interface and functionality. """ + Settings = MistralLLMSettings _settings: MistralLLMSettings def __init__( diff --git a/src/pipecat/services/moondream/vision.py b/src/pipecat/services/moondream/vision.py index 32b592061..abc344fc5 100644 --- a/src/pipecat/services/moondream/vision.py +++ b/src/pipecat/services/moondream/vision.py @@ -79,6 +79,9 @@ class MoondreamService(VisionService): including CUDA, MPS, and Intel XPU. """ + Settings = MoondreamSettings + _settings: MoondreamSettings + def __init__( self, *, diff --git a/src/pipecat/services/neuphonic/tts.py b/src/pipecat/services/neuphonic/tts.py index 441d222ea..abc33c37e 100644 --- a/src/pipecat/services/neuphonic/tts.py +++ b/src/pipecat/services/neuphonic/tts.py @@ -91,6 +91,7 @@ class NeuphonicTTSService(InterruptibleTTSService): parameters for high-quality speech generation. """ + Settings = NeuphonicTTSSettings _settings: NeuphonicTTSSettings class InputParams(BaseModel): @@ -430,6 +431,7 @@ class NeuphonicHttpTTSService(TTSService): HTTP-based communication over WebSocket connections. """ + Settings = NeuphonicTTSSettings _settings: NeuphonicTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/nvidia/llm.py b/src/pipecat/services/nvidia/llm.py index 65c0880e4..17490f513 100644 --- a/src/pipecat/services/nvidia/llm.py +++ b/src/pipecat/services/nvidia/llm.py @@ -36,6 +36,7 @@ class NvidiaLLMService(OpenAILLMService): in token usage reporting between NIM (incremental) and OpenAI (final summary). """ + Settings = NvidiaLLMSettings _settings: NvidiaLLMSettings def __init__( diff --git a/src/pipecat/services/nvidia/stt.py b/src/pipecat/services/nvidia/stt.py index 3d6d2391e..5935e7846 100644 --- a/src/pipecat/services/nvidia/stt.py +++ b/src/pipecat/services/nvidia/stt.py @@ -125,6 +125,7 @@ class NvidiaSTTService(STTService): processing for low-latency applications. """ + Settings = NvidiaSTTSettings _settings: NvidiaSTTSettings class InputParams(BaseModel): @@ -439,6 +440,7 @@ class NvidiaSegmentedSTTService(SegmentedSTTService): audio buffering and speech detection. """ + Settings = NvidiaSegmentedSTTSettings _settings: NvidiaSegmentedSTTSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/nvidia/tts.py b/src/pipecat/services/nvidia/tts.py index fb701185c..ad39d505b 100644 --- a/src/pipecat/services/nvidia/tts.py +++ b/src/pipecat/services/nvidia/tts.py @@ -61,6 +61,7 @@ class NvidiaTTSService(TTSService): configurable quality settings. """ + Settings = NvidiaTTSSettings _settings: NvidiaTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/ollama/llm.py b/src/pipecat/services/ollama/llm.py index 42b5b00b1..f4d138d78 100644 --- a/src/pipecat/services/ollama/llm.py +++ b/src/pipecat/services/ollama/llm.py @@ -30,6 +30,7 @@ class OLLamaLLMService(OpenAILLMService): providing a compatible interface for running large language models locally. """ + Settings = OllamaLLMSettings _settings: OllamaLLMSettings def __init__( diff --git a/src/pipecat/services/openai/base_llm.py b/src/pipecat/services/openai/base_llm.py index bfeae62a1..5466c75a5 100644 --- a/src/pipecat/services/openai/base_llm.py +++ b/src/pipecat/services/openai/base_llm.py @@ -68,6 +68,7 @@ class BaseOpenAILLMService(LLMService): configurations. """ + Settings = OpenAILLMSettings _settings: OpenAILLMSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/openai/image.py b/src/pipecat/services/openai/image.py index 397d8c3d2..6091863f3 100644 --- a/src/pipecat/services/openai/image.py +++ b/src/pipecat/services/openai/image.py @@ -48,6 +48,7 @@ class OpenAIImageGenService(ImageGenService): with configurable quality and style parameters. """ + Settings = OpenAIImageGenSettings _settings: OpenAIImageGenSettings def __init__( diff --git a/src/pipecat/services/openai/realtime/llm.py b/src/pipecat/services/openai/realtime/llm.py index c25181dd1..4fa3ab604 100644 --- a/src/pipecat/services/openai/realtime/llm.py +++ b/src/pipecat/services/openai/realtime/llm.py @@ -211,6 +211,7 @@ class OpenAIRealtimeLLMService(LLMService): management, and real-time transcription. """ + Settings = OpenAIRealtimeLLMSettings _settings: OpenAIRealtimeLLMSettings # Overriding the default adapter to use the OpenAIRealtimeLLMAdapter one. diff --git a/src/pipecat/services/openai/stt.py b/src/pipecat/services/openai/stt.py index a6d7beb0c..e2f9ec0ee 100644 --- a/src/pipecat/services/openai/stt.py +++ b/src/pipecat/services/openai/stt.py @@ -69,6 +69,7 @@ class OpenAISTTService(BaseWhisperSTTService): set via the api_key parameter or OPENAI_API_KEY environment variable. """ + Settings = OpenAISTTSettings _settings: OpenAISTTSettings def __init__( @@ -224,6 +225,7 @@ class OpenAIRealtimeSTTService(WebsocketSTTService): ) """ + Settings = OpenAIRealtimeSTTSettings _settings: OpenAIRealtimeSTTSettings def __init__( diff --git a/src/pipecat/services/openai/tts.py b/src/pipecat/services/openai/tts.py index 71c04c59f..264475113 100644 --- a/src/pipecat/services/openai/tts.py +++ b/src/pipecat/services/openai/tts.py @@ -81,6 +81,7 @@ class OpenAITTSService(TTSService): speech synthesis with streaming audio output. """ + Settings = OpenAITTSSettings _settings: OpenAITTSSettings OPENAI_SAMPLE_RATE = 24000 # OpenAI TTS always outputs at 24kHz diff --git a/src/pipecat/services/openai_realtime_beta/azure.py b/src/pipecat/services/openai_realtime_beta/azure.py index 55fb7744d..6497e1266 100644 --- a/src/pipecat/services/openai_realtime_beta/azure.py +++ b/src/pipecat/services/openai_realtime_beta/azure.py @@ -42,6 +42,7 @@ class AzureRealtimeBetaLLMService(OpenAIRealtimeBetaLLMService): real-time audio and text communication capabilities as the base OpenAI service. """ + Settings = AzureRealtimeBetaLLMSettings _settings: AzureRealtimeBetaLLMSettings def __init__( diff --git a/src/pipecat/services/openai_realtime_beta/openai.py b/src/pipecat/services/openai_realtime_beta/openai.py index 689ca91a5..51fcc2720 100644 --- a/src/pipecat/services/openai_realtime_beta/openai.py +++ b/src/pipecat/services/openai_realtime_beta/openai.py @@ -111,6 +111,7 @@ class OpenAIRealtimeBetaLLMService(LLMService): management, and real-time transcription. """ + Settings = OpenAIRealtimeBetaLLMSettings _settings: OpenAIRealtimeBetaLLMSettings # Overriding the default adapter to use the OpenAIRealtimeLLMAdapter one. diff --git a/src/pipecat/services/openpipe/llm.py b/src/pipecat/services/openpipe/llm.py index 58840c40d..3fef1e3af 100644 --- a/src/pipecat/services/openpipe/llm.py +++ b/src/pipecat/services/openpipe/llm.py @@ -43,6 +43,7 @@ class OpenPipeLLMService(OpenAILLMService): for model training and evaluation. """ + Settings = OpenPipeLLMSettings _settings: OpenPipeLLMSettings def __init__( diff --git a/src/pipecat/services/openrouter/llm.py b/src/pipecat/services/openrouter/llm.py index 411eca91e..d57c5cf24 100644 --- a/src/pipecat/services/openrouter/llm.py +++ b/src/pipecat/services/openrouter/llm.py @@ -34,6 +34,7 @@ class OpenRouterLLMService(OpenAILLMService): maintaining full compatibility with OpenAI's interface and functionality. """ + Settings = OpenRouterLLMSettings _settings: OpenRouterLLMSettings def __init__( diff --git a/src/pipecat/services/perplexity/llm.py b/src/pipecat/services/perplexity/llm.py index 614e6ad9b..b13fb20f0 100644 --- a/src/pipecat/services/perplexity/llm.py +++ b/src/pipecat/services/perplexity/llm.py @@ -38,6 +38,7 @@ class PerplexityLLMService(OpenAILLMService): in token usage reporting between Perplexity (incremental) and OpenAI (final summary). """ + Settings = PerplexityLLMSettings _settings: PerplexityLLMSettings def __init__( diff --git a/src/pipecat/services/piper/tts.py b/src/pipecat/services/piper/tts.py index fb7b627cd..9a44b8e21 100644 --- a/src/pipecat/services/piper/tts.py +++ b/src/pipecat/services/piper/tts.py @@ -46,6 +46,7 @@ class PiperTTSService(TTSService): match the configured sample rate. """ + Settings = PiperTTSSettings _settings: PiperTTSSettings def __init__( @@ -199,6 +200,7 @@ class PiperHttpTTSService(TTSService): rates and automatic WAV header removal. """ + Settings = PiperHttpTTSSettings _settings: PiperHttpTTSSettings def __init__( diff --git a/src/pipecat/services/qwen/llm.py b/src/pipecat/services/qwen/llm.py index ba2b734c7..d145f8339 100644 --- a/src/pipecat/services/qwen/llm.py +++ b/src/pipecat/services/qwen/llm.py @@ -30,6 +30,7 @@ class QwenLLMService(OpenAILLMService): maintaining full compatibility with OpenAI's interface and functionality. """ + Settings = QwenLLMSettings _settings: QwenLLMSettings def __init__( diff --git a/src/pipecat/services/resembleai/tts.py b/src/pipecat/services/resembleai/tts.py index 9713cea44..31977ca0b 100644 --- a/src/pipecat/services/resembleai/tts.py +++ b/src/pipecat/services/resembleai/tts.py @@ -51,6 +51,7 @@ class ResembleAITTSService(WebsocketTTSService): multiple simultaneous synthesis requests with proper interruption support. """ + Settings = ResembleAITTSSettings _settings: ResembleAITTSSettings def __init__( diff --git a/src/pipecat/services/rime/tts.py b/src/pipecat/services/rime/tts.py index 8a9186c59..15cc8b88a 100644 --- a/src/pipecat/services/rime/tts.py +++ b/src/pipecat/services/rime/tts.py @@ -131,6 +131,7 @@ class RimeTTSService(WebsocketTTSService): within a turn. """ + Settings = RimeTTSSettings _settings: RimeTTSSettings class InputParams(BaseModel): @@ -661,6 +662,7 @@ class RimeHttpTTSService(TTSService): Suitable for use cases where streaming is not required. """ + Settings = RimeTTSSettings _settings: RimeTTSSettings class InputParams(BaseModel): @@ -885,6 +887,7 @@ class RimeNonJsonTTSService(InterruptibleTTSService): accepts and returns non-JSON messages. """ + Settings = RimeNonJsonTTSSettings _settings: RimeNonJsonTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/sambanova/llm.py b/src/pipecat/services/sambanova/llm.py index e56f2576b..629c3d4c5 100644 --- a/src/pipecat/services/sambanova/llm.py +++ b/src/pipecat/services/sambanova/llm.py @@ -42,6 +42,7 @@ class SambaNovaLLMService(OpenAILLMService): # type: ignore maintaining full compatibility with OpenAI's interface and functionality. """ + Settings = SambaNovaLLMSettings _settings: SambaNovaLLMSettings def __init__( diff --git a/src/pipecat/services/sambanova/stt.py b/src/pipecat/services/sambanova/stt.py index 822c44da9..c273b67eb 100644 --- a/src/pipecat/services/sambanova/stt.py +++ b/src/pipecat/services/sambanova/stt.py @@ -35,6 +35,8 @@ class SambaNovaSTTService(BaseWhisperSTTService): # type: ignore Requires a SambaNova API key set via the api_key parameter or SAMBANOVA_API_KEY environment variable. """ + Settings = SambaNovaSTTSettings + def __init__( self, *, diff --git a/src/pipecat/services/sarvam/stt.py b/src/pipecat/services/sarvam/stt.py index cd6d19ac0..429973838 100644 --- a/src/pipecat/services/sarvam/stt.py +++ b/src/pipecat/services/sarvam/stt.py @@ -171,6 +171,7 @@ class SarvamSTTService(STTService): ... """ + Settings = SarvamSTTSettings _settings: SarvamSTTSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/sarvam/tts.py b/src/pipecat/services/sarvam/tts.py index c0a74b198..639a860ac 100644 --- a/src/pipecat/services/sarvam/tts.py +++ b/src/pipecat/services/sarvam/tts.py @@ -351,6 +351,7 @@ class SarvamHttpTTSService(TTSService): ) """ + Settings = SarvamHttpTTSSettings _settings: SarvamHttpTTSSettings class InputParams(BaseModel): @@ -717,6 +718,7 @@ class SarvamTTSService(InterruptibleTTSService): See https://docs.sarvam.ai/api-reference-docs/text-to-speech/stream for API details. """ + Settings = SarvamTTSSettings _settings: SarvamTTSSettings class InputParams(BaseModel): diff --git a/src/pipecat/services/soniox/stt.py b/src/pipecat/services/soniox/stt.py index 613e35a28..6e5a8f62c 100644 --- a/src/pipecat/services/soniox/stt.py +++ b/src/pipecat/services/soniox/stt.py @@ -174,6 +174,7 @@ class SonioxSTTService(WebsocketSTTService): For complete API documentation, see: https://soniox.com/docs/speech-to-text/api-reference/websocket-api """ + Settings = SonioxSTTSettings _settings: SonioxSTTSettings def __init__( diff --git a/src/pipecat/services/speechmatics/stt.py b/src/pipecat/services/speechmatics/stt.py index e3100a2ad..aaff90900 100644 --- a/src/pipecat/services/speechmatics/stt.py +++ b/src/pipecat/services/speechmatics/stt.py @@ -175,6 +175,7 @@ class SpeechmaticsSTTService(STTService): ... """ + Settings = SpeechmaticsSTTSettings _settings: SpeechmaticsSTTSettings # Export related classes as class attributes diff --git a/src/pipecat/services/speechmatics/tts.py b/src/pipecat/services/speechmatics/tts.py index a93d9c78a..5f0aed7f3 100644 --- a/src/pipecat/services/speechmatics/tts.py +++ b/src/pipecat/services/speechmatics/tts.py @@ -53,6 +53,7 @@ class SpeechmaticsTTSService(TTSService): It converts text to speech and returns raw PCM audio data for real-time playback. """ + Settings = SpeechmaticsTTSSettings _settings: SpeechmaticsTTSSettings SPEECHMATICS_SAMPLE_RATE = 16000 diff --git a/src/pipecat/services/tavus/video.py b/src/pipecat/services/tavus/video.py index 4a7211033..3d5946e54 100644 --- a/src/pipecat/services/tavus/video.py +++ b/src/pipecat/services/tavus/video.py @@ -59,6 +59,9 @@ class TavusVideoService(AIService): - User room: Contains the Pipecat Bot and the user """ + Settings = TavusVideoSettings + _settings: TavusVideoSettings + def __init__( self, *, diff --git a/src/pipecat/services/together/llm.py b/src/pipecat/services/together/llm.py index 38089addc..21663206e 100644 --- a/src/pipecat/services/together/llm.py +++ b/src/pipecat/services/together/llm.py @@ -30,6 +30,7 @@ class TogetherLLMService(OpenAILLMService): maintaining full compatibility with OpenAI's interface and functionality. """ + Settings = TogetherLLMSettings _settings: TogetherLLMSettings def __init__( diff --git a/src/pipecat/services/ultravox/llm.py b/src/pipecat/services/ultravox/llm.py index eccc1a864..bfd34ceae 100644 --- a/src/pipecat/services/ultravox/llm.py +++ b/src/pipecat/services/ultravox/llm.py @@ -166,6 +166,7 @@ class UltravoxRealtimeLLMService(LLMService): by the model and may not always align with its understanding of user input. """ + Settings = UltravoxRealtimeLLMSettings _settings: UltravoxRealtimeLLMSettings def __init__( diff --git a/src/pipecat/services/whisper/base_stt.py b/src/pipecat/services/whisper/base_stt.py index a3bb98548..869f92a55 100644 --- a/src/pipecat/services/whisper/base_stt.py +++ b/src/pipecat/services/whisper/base_stt.py @@ -122,6 +122,7 @@ class BaseWhisperSTTService(SegmentedSTTService): including metrics generation and error handling. """ + Settings = BaseWhisperSTTSettings _settings: BaseWhisperSTTSettings def __init__( diff --git a/src/pipecat/services/whisper/stt.py b/src/pipecat/services/whisper/stt.py index ab5354e2c..b5971ce9a 100644 --- a/src/pipecat/services/whisper/stt.py +++ b/src/pipecat/services/whisper/stt.py @@ -207,6 +207,7 @@ class WhisperSTTService(SegmentedSTTService): segments. It supports multiple languages and various model sizes. """ + Settings = WhisperSTTSettings _settings: WhisperSTTSettings def __init__( @@ -380,6 +381,7 @@ class WhisperSTTServiceMLX(WhisperSTTService): segments. It's optimized for Apple Silicon and supports multiple languages and quantizations. """ + Settings = WhisperMLXSTTSettings _settings: WhisperMLXSTTSettings def __init__( diff --git a/src/pipecat/services/xtts/tts.py b/src/pipecat/services/xtts/tts.py index 78ac6dfb8..32c2781f2 100644 --- a/src/pipecat/services/xtts/tts.py +++ b/src/pipecat/services/xtts/tts.py @@ -83,6 +83,7 @@ class XTTSService(TTSService): studio speakers configuration. """ + Settings = XTTSTTSSettings _settings: XTTSTTSSettings def __init__( From cd28c82de3e8541ff456858a605283962e92e280 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Sat, 7 Mar 2026 09:15:24 -0500 Subject: [PATCH 2/3] Update examples to use the class Settings alias --- examples/foundational/01-say-one-thing-rime.py | 4 ++-- examples/foundational/01-say-one-thing.py | 4 ++-- examples/foundational/01a-local-audio.py | 4 ++-- examples/foundational/01b-livekit-audio.py | 4 ++-- examples/foundational/02-llm-say-one-thing.py | 8 ++++---- examples/foundational/03-still-frame.py | 4 ++-- examples/foundational/03a-local-still-frame.py | 4 ++-- .../foundational/04-transports-small-webrtc.py | 8 ++++---- examples/foundational/04a-transports-daily.py | 8 ++++---- .../foundational/04b-transports-livekit.py | 8 ++++---- .../foundational/05-sync-speech-and-image.py | 8 ++++---- .../05a-local-sync-speech-and-image.py | 8 ++++---- examples/foundational/06-listen-and-respond.py | 8 ++++---- examples/foundational/06a-image-sync.py | 8 ++++---- .../07-interruptible-cartesia-http.py | 8 ++++---- examples/foundational/07-interruptible.py | 8 ++++---- .../07a-interruptible-speechmatics-vad.py | 11 +++++------ .../07a-interruptible-speechmatics.py | 11 +++++------ .../07b-interruptible-langchain.py | 4 ++-- .../07c-interruptible-deepgram-flux.py | 12 ++++++------ .../07c-interruptible-deepgram-http.py | 8 ++++---- .../07c-interruptible-deepgram-sagemaker.py | 7 ++----- .../07c-interruptible-deepgram-vad.py | 12 ++++++------ .../foundational/07c-interruptible-deepgram.py | 8 ++++---- .../07d-interruptible-elevenlabs-http.py | 8 ++++---- .../07d-interruptible-elevenlabs.py | 8 ++++---- .../07f-interruptible-azure-http.py | 4 ++-- .../foundational/07f-interruptible-azure.py | 4 ++-- .../07g-interruptible-openai-http.py | 12 ++++++------ .../foundational/07g-interruptible-openai.py | 12 ++++++------ .../foundational/07h-interruptible-openpipe.py | 8 ++++---- .../foundational/07i-interruptible-xtts.py | 8 ++++---- .../07j-interruptible-gladia-vad.py | 12 ++++++------ .../foundational/07j-interruptible-gladia.py | 12 ++++++------ .../foundational/07k-interruptible-lmnt.py | 8 ++++---- .../foundational/07l-interruptible-groq.py | 4 ++-- .../07m-interruptible-aws-strands.py | 4 ++-- examples/foundational/07m-interruptible-aws.py | 8 ++++---- .../07n-interruptible-gemini-image.py | 12 ++++++------ .../foundational/07n-interruptible-gemini.py | 12 ++++++------ .../07n-interruptible-google-http.py | 12 ++++++------ .../foundational/07n-interruptible-google.py | 12 ++++++------ ...-interruptible-assemblyai-turn-detection.py | 12 ++++++------ .../07o-interruptible-assemblyai.py | 8 ++++---- .../07p-interruptible-krisp-viva.py | 8 ++++---- .../foundational/07p-interruptible-krisp.py | 8 ++++---- .../07q-interruptible-rime-http.py | 8 ++++---- .../foundational/07q-interruptible-rime.py | 8 ++++---- .../foundational/07r-interruptible-nvidia.py | 4 ++-- .../07s-interruptible-google-audio-in.py | 8 ++++---- .../foundational/07t-interruptible-fish.py | 8 ++++---- .../07v-interruptible-neuphonic-http.py | 8 ++++---- .../07v-interruptible-neuphonic.py | 8 ++++---- examples/foundational/07w-interruptible-fal.py | 8 ++++---- .../foundational/07x-interruptible-local.py | 8 ++++---- .../foundational/07y-interruptible-minimax.py | 8 ++++---- .../07z-interruptible-sarvam-http.py | 12 ++++++------ .../foundational/07z-interruptible-sarvam.py | 12 ++++++------ .../foundational/07za-interruptible-soniox.py | 12 ++++++------ .../07zb-interruptible-inworld-http.py | 8 ++++---- .../foundational/07zb-interruptible-inworld.py | 8 ++++---- .../07zc-interruptible-asyncai-http.py | 8 ++++---- .../foundational/07zc-interruptible-asyncai.py | 8 ++++---- .../07zd-interruptible-aicoustics.py | 8 ++++---- .../foundational/07ze-interruptible-hume.py | 8 ++++---- .../foundational/07zf-interruptible-gradium.py | 12 ++++++------ .../foundational/07zg-interruptible-camb.py | 8 ++++---- .../foundational/07zi-interruptible-piper.py | 8 ++++---- .../foundational/07zj-interruptible-kokoro.py | 8 ++++---- .../07zk-interruptible-resemble.py | 8 ++++---- .../foundational/08-custom-frame-processor.py | 8 ++++---- examples/foundational/10-wake-phrase.py | 8 ++++---- examples/foundational/11-sound-effects.py | 8 ++++---- .../foundational/12-describe-image-openai.py | 8 ++++---- .../12a-describe-image-anthropic.py | 8 ++++---- .../foundational/12b-describe-image-aws.py | 8 ++++---- .../12c-describe-image-gemini-flash.py | 8 ++++---- .../12d-describe-image-moondream.py | 4 ++-- .../foundational/13b-deepgram-transcription.py | 4 ++-- .../foundational/13c-gladia-translation.py | 5 ++--- .../13d-assemblyai-transcription.py | 4 ++-- examples/foundational/13e-whisper-mlx.py | 4 ++-- .../13g-sambanova-transcription.py | 4 ++-- .../13h-speechmatics-transcription.py | 4 ++-- .../foundational/13l-gradium-transcription.py | 4 ++-- .../foundational/13m-openai-transcription.py | 4 ++-- examples/foundational/14-function-calling.py | 8 ++++---- .../14a-function-calling-anthropic.py | 8 ++++---- .../14c-function-calling-together.py | 8 ++++---- .../14d-function-calling-anthropic-video.py | 8 ++++---- .../14d-function-calling-aws-video.py | 8 ++++---- .../14d-function-calling-gemini-flash-video.py | 8 ++++---- .../14d-function-calling-moondream-video.py | 8 ++++---- .../14d-function-calling-openai-video.py | 8 ++++---- .../14e-function-calling-google.py | 8 ++++---- .../foundational/14f-function-calling-groq.py | 8 ++++---- .../foundational/14g-function-calling-grok.py | 8 ++++---- .../foundational/14h-function-calling-azure.py | 8 ++++---- .../14i-function-calling-fireworks.py | 8 ++++---- .../14j-function-calling-nvidia.py | 8 ++++---- .../14k-function-calling-cerebras.py | 8 ++++---- .../14l-function-calling-deepseek.py | 8 ++++---- .../14m-function-calling-openrouter.py | 8 ++++---- .../14n-function-calling-perplexity.py | 8 ++++---- ...4o-function-calling-gemini-openai-format.py | 8 ++++---- .../14p-function-calling-gemini-vertex-ai.py | 8 ++++---- .../foundational/14q-function-calling-qwen.py | 8 ++++---- .../foundational/14r-function-calling-aws.py | 8 ++++---- .../14s-function-calling-sambanova.py | 8 ++++---- .../14t-function-calling-direct.py | 8 ++++---- .../14u-function-calling-ollama.py | 8 ++++---- .../14v-function-calling-openai.py | 12 ++++++------ .../14w-function-calling-mistral.py | 8 ++++---- .../14x-function-calling-openpipe.py | 8 ++++---- examples/foundational/15-switch-voices.py | 12 ++++++------ examples/foundational/15a-switch-languages.py | 14 +++++++------- .../foundational/16-gpu-container-local-bot.py | 8 ++++---- examples/foundational/17-detect-user-idle.py | 8 ++++---- examples/foundational/19-openai-realtime.py | 7 ++----- examples/foundational/19a-azure-realtime.py | 3 +-- .../19b-openai-realtime-beta-text.py | 4 ++-- .../foundational/19b-openai-realtime-text.py | 4 ++-- .../19c-openai-realtime-live-video.py | 7 ++----- .../20a-persistent-context-openai.py | 4 ++-- .../20b-persistent-context-openai-realtime.py | 7 ++----- .../20c-persistent-context-anthropic.py | 10 ++++++---- .../20d-persistent-context-gemini.py | 4 ++-- .../20e-persistent-context-aws-nova-sonic.py | 4 ++-- examples/foundational/21-tavus-transport.py | 8 ++++---- .../foundational/21a-tavus-video-service.py | 8 ++++---- .../foundational/22-filter-incomplete-turns.py | 8 ++++---- .../foundational/23-bot-background-sound.py | 8 ++++---- examples/foundational/24-user-mute-strategy.py | 8 ++++---- examples/foundational/25-google-audio-in.py | 10 +++++----- examples/foundational/26-gemini-live.py | 4 ++-- .../26a-gemini-live-transcription.py | 8 +++++--- .../26b-gemini-live-function-calling.py | 4 ++-- examples/foundational/26c-gemini-live-video.py | 4 ++-- examples/foundational/26d-gemini-live-text.py | 11 +++-------- .../26e-gemini-live-google-search.py | 4 ++-- .../foundational/26f-gemini-live-files-api.py | 4 ++-- .../26g-gemini-live-groundingMetadata.py | 4 ++-- .../26h-gemini-live-vertex-function-calling.py | 3 +-- .../26i-gemini-live-graceful-end.py | 4 ++-- examples/foundational/27-simli-layer.py | 8 ++++---- .../foundational/28-user-assistant-turns.py | 8 ++++---- .../foundational/29-turn-tracking-observer.py | 8 ++++---- examples/foundational/30-observer.py | 8 ++++---- .../32-gemini-grounding-metadata.py | 8 ++++---- examples/foundational/33-gemini-rag.py | 8 ++++---- examples/foundational/34-audio-recording.py | 8 ++++---- .../35-pattern-pair-voice-switching.py | 8 ++++---- .../foundational/36-user-email-gathering.py | 8 ++++---- examples/foundational/37-mem0.py | 8 ++++---- examples/foundational/38-smart-turn-fal.py | 8 ++++---- .../38a-smart-turn-local-coreml.py | 8 ++++---- examples/foundational/38b-smart-turn-local.py | 8 ++++---- examples/foundational/39-mcp-stdio.py | 8 ++++---- .../foundational/39a-mcp-streamable-http.py | 4 ++-- .../39b-mcp-streamable-http-gemini-live.py | 4 ++-- examples/foundational/39c-multiple-mcp.py | 8 ++++---- examples/foundational/40-aws-nova-sonic.py | 4 ++-- .../foundational/42-interruption-config.py | 8 ++++---- examples/foundational/43-heygen-transport.py | 8 ++++---- .../foundational/43a-heygen-video-service.py | 8 ++++---- .../foundational/44-voicemail-detection.py | 8 ++++---- .../foundational/45-before-and-after-events.py | 8 ++++---- examples/foundational/47-sentry-metrics.py | 8 ++++---- examples/foundational/48-service-switcher.py | 16 ++++++++-------- .../foundational/49a-thinking-anthropic.py | 12 ++++-------- examples/foundational/49b-thinking-google.py | 8 ++++---- .../49c-thinking-functions-anthropic.py | 12 ++++-------- .../49d-thinking-functions-google.py | 8 ++++---- examples/foundational/51-grok-realtime.py | 4 +++- examples/foundational/52-live-translation.py | 8 ++++---- .../53-concurrent-llm-evaluation.py | 12 ++++++------ .../53-concurrent-llm-rtvi-ignored-sources.py | 10 +++++----- .../54-context-summarization-openai.py | 8 ++++---- .../54a-context-summarization-google.py | 8 ++++---- .../54b-context-summarization-manual-openai.py | 10 ++++------ .../54c-context-summarization-dedicated-llm.py | 12 ++++++------ .../55a-update-settings-deepgram-flux-stt.py | 12 ++++++------ ...a-update-settings-deepgram-sagemaker-stt.py | 15 ++++++--------- .../55a-update-settings-deepgram-stt.py | 12 ++++++------ .../55b-update-settings-azure-stt.py | 14 ++++++++------ .../55c-update-settings-google-stt.py | 12 ++++++------ .../55d-update-settings-assemblyai-stt.py | 14 +++++++------- .../55e-update-settings-gladia-stt.py | 12 ++++++------ ...-update-settings-elevenlabs-realtime-stt.py | 17 ++++++++--------- .../55g-update-settings-elevenlabs-stt.py | 12 ++++++------ .../55h-update-settings-speechmatics-stt.py | 18 +++++++++--------- .../55i-update-settings-whisper-api-stt.py | 8 ++++---- .../55j-update-settings-sarvam-stt.py | 12 ++++++------ .../55k-update-settings-soniox-stt.py | 12 ++++++------ .../55l-update-settings-aws-transcribe-stt.py | 12 ++++++------ .../55m-update-settings-cartesia-stt.py | 12 ++++++------ .../55n-update-settings-cartesia-http-tts.py | 14 +++++--------- .../55n-update-settings-cartesia-tts.py | 10 +++++----- .../55o-update-settings-elevenlabs-http-tts.py | 10 +++++----- .../55o-update-settings-elevenlabs-tts.py | 15 ++++++++------- .../55p-update-settings-openai-tts.py | 8 ++++---- .../55q-update-settings-deepgram-http-tts.py | 14 +++++++++----- ...q-update-settings-deepgram-sagemaker-tts.py | 17 +++++++++-------- .../55q-update-settings-deepgram-tts.py | 10 +++++----- .../55r-update-settings-azure-http-tts.py | 8 ++++---- .../55r-update-settings-azure-tts.py | 8 ++++---- .../55s-update-settings-google-http-tts.py | 8 ++++---- .../55s-update-settings-google-stream-tts.py | 8 ++++---- .../55u-update-settings-rime-http-tts.py | 12 +++++++----- .../55u-update-settings-rime-tts.py | 10 +++++----- .../55v-update-settings-lmnt-tts.py | 10 +++++----- .../55w-update-settings-fish-tts.py | 12 +++++++----- .../55x-update-settings-minimax-tts.py | 10 ++++++---- .../55y-update-settings-groq-tts.py | 8 ++++---- .../55z-update-settings-hume-tts.py | 10 +++++----- .../55za-update-settings-neuphonic-http-tts.py | 10 ++++++---- .../55za-update-settings-neuphonic-tts.py | 10 ++++++---- .../55zb-update-settings-inworld-http-tts.py | 10 ++++++---- .../55zb-update-settings-inworld-tts.py | 10 ++++++---- .../55zc-update-settings-gemini-tts.py | 12 +++++++----- .../55zd-update-settings-aws-polly-tts.py | 10 ++++++---- .../55ze-update-settings-sarvam-http-tts.py | 10 ++++++---- .../55ze-update-settings-sarvam-tts.py | 8 ++++---- .../55zf-update-settings-camb-tts.py | 10 ++++++---- .../55zh-update-settings-resembleai-tts.py | 10 +++++----- .../55zi-update-settings-azure-llm.py | 13 +++++++------ .../55zi-update-settings-openai-llm.py | 11 ++++++----- .../55zj-update-settings-anthropic-llm.py | 12 +++++++----- .../55zk-update-settings-google-llm.py | 12 +++++++----- .../55zk-update-settings-google-vertex-llm.py | 12 +++++++----- .../55zl-update-settings-azure-realtime.py | 5 ++--- .../55zl-update-settings-openai-realtime.py | 9 +++------ .../55zm-update-settings-gemini-live-vertex.py | 7 ++++--- .../55zm-update-settings-gemini-live.py | 8 +++++--- .../55zn-update-settings-ultravox-realtime.py | 10 +++------- .../55zo-update-settings-grok-realtime.py | 7 ++----- .../55zp-update-settings-aws-bedrock-llm.py | 12 +++++++----- .../55zq-update-settings-fal-stt.py | 14 ++++++++------ .../55zr-update-settings-gradium-stt.py | 14 ++++++++------ ...5zt-update-settings-nvidia-segmented-stt.py | 12 ++++++------ .../55zt-update-settings-nvidia-stt.py | 12 ++++++------ ...55zu-update-settings-openai-realtime-stt.py | 12 ++++++------ .../55zv-update-settings-asyncai-http-tts.py | 10 +++++----- .../55zv-update-settings-asyncai-tts.py | 10 +++++----- .../55zw-update-settings-gradium-tts.py | 10 +++++----- .../55zx-update-settings-cerebras-llm.py | 13 +++++++------ .../55zy-update-settings-deepseek-llm.py | 13 +++++++------ .../55zz-update-settings-fireworks-llm.py | 13 +++++++------ .../55zza-update-settings-grok-llm.py | 13 +++++++------ .../55zzb-update-settings-groq-llm.py | 13 +++++++------ .../55zzc-update-settings-mistral-llm.py | 12 +++++++----- .../55zzd-update-settings-nvidia-llm.py | 13 +++++++------ .../55zze-update-settings-ollama-llm.py | 13 +++++++------ .../55zzf-update-settings-openrouter-llm.py | 13 +++++++------ .../55zzg-update-settings-perplexity-llm.py | 9 +++++---- .../55zzh-update-settings-qwen-llm.py | 13 +++++++------ .../55zzi-update-settings-sambanova-llm.py | 13 +++++++------ .../55zzj-update-settings-together-llm.py | 13 +++++++------ ...55zzk-update-settings-aws-nova-sonic-llm.py | 6 +++--- .../55zzl-update-settings-nvidia-tts.py | 8 ++++---- .../55zzm-update-settings-speechmatics-tts.py | 8 ++++---- .../55zzn-update-settings-groq-stt.py | 11 +++++------ .../foundational/56-lemonslice-transport.py | 8 ++++---- scripts/evals/eval.py | 12 +++++++----- 264 files changed, 1172 insertions(+), 1155 deletions(-) diff --git a/examples/foundational/01-say-one-thing-rime.py b/examples/foundational/01-say-one-thing-rime.py index 63667fac8..a9df51f7f 100644 --- a/examples/foundational/01-say-one-thing-rime.py +++ b/examples/foundational/01-say-one-thing-rime.py @@ -16,7 +16,7 @@ from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineTask from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.rime.tts import RimeHttpTTSService, RimeTTSSettings +from pipecat.services.rime.tts import RimeHttpTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -40,7 +40,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = RimeHttpTTSService( api_key=os.getenv("RIME_API_KEY", ""), aiohttp_session=session, - settings=RimeTTSSettings( + settings=RimeHttpTTSService.Settings( voice="rex", ), ) diff --git a/examples/foundational/01-say-one-thing.py b/examples/foundational/01-say-one-thing.py index bfcf829cc..fdfecde6c 100644 --- a/examples/foundational/01-say-one-thing.py +++ b/examples/foundational/01-say-one-thing.py @@ -15,7 +15,7 @@ from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineTask from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -37,7 +37,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/01a-local-audio.py b/examples/foundational/01a-local-audio.py index 77565dffe..1e18b4b03 100644 --- a/examples/foundational/01a-local-audio.py +++ b/examples/foundational/01a-local-audio.py @@ -15,7 +15,7 @@ from pipecat.frames.frames import EndFrame, TTSSpeakFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineTask -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.transports.local.audio import LocalAudioTransport, LocalAudioTransportParams load_dotenv(override=True) @@ -29,7 +29,7 @@ async def main(): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/01b-livekit-audio.py b/examples/foundational/01b-livekit-audio.py index ad4c785eb..5f64a29ed 100644 --- a/examples/foundational/01b-livekit-audio.py +++ b/examples/foundational/01b-livekit-audio.py @@ -16,7 +16,7 @@ from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineTask from pipecat.runner.livekit import configure -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.transports.livekit.transport import LiveKitParams, LiveKitTransport load_dotenv(override=True) @@ -37,7 +37,7 @@ async def main(): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/02-llm-say-one-thing.py b/examples/foundational/02-llm-say-one-thing.py index f59a2216d..cebea9dcf 100644 --- a/examples/foundational/02-llm-say-one-thing.py +++ b/examples/foundational/02-llm-say-one-thing.py @@ -16,8 +16,8 @@ from pipecat.pipeline.task import PipelineTask from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -39,14 +39,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are an LLM in a WebRTC session, and this is a 'hello world' demo.", ), ) diff --git a/examples/foundational/03-still-frame.py b/examples/foundational/03-still-frame.py index a98a53637..dc1bf4c5f 100644 --- a/examples/foundational/03-still-frame.py +++ b/examples/foundational/03-still-frame.py @@ -16,7 +16,7 @@ from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineTask from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.fal.image import FalImageGenService, FalImageGenSettings +from pipecat.services.fal.image import FalImageGenService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -45,7 +45,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Create an HTTP session async with aiohttp.ClientSession() as session: imagegen = FalImageGenService( - settings=FalImageGenSettings( + settings=FalImageGenService.Settings( image_size="square_hd", ), aiohttp_session=session, diff --git a/examples/foundational/03a-local-still-frame.py b/examples/foundational/03a-local-still-frame.py index db67848e8..0b70e2297 100644 --- a/examples/foundational/03a-local-still-frame.py +++ b/examples/foundational/03a-local-still-frame.py @@ -17,7 +17,7 @@ from pipecat.frames.frames import TextFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineTask -from pipecat.services.fal.image import FalImageGenService, FalImageGenSettings +from pipecat.services.fal.image import FalImageGenService from pipecat.transports.local.tk import TkLocalTransport, TkTransportParams load_dotenv(override=True) @@ -37,7 +37,7 @@ async def main(): ) imagegen = FalImageGenService( - settings=FalImageGenSettings( + settings=FalImageGenService.Settings( image_size="square_hd", ), aiohttp_session=session, diff --git a/examples/foundational/04-transports-small-webrtc.py b/examples/foundational/04-transports-small-webrtc.py index d8b6422db..ba4749919 100644 --- a/examples/foundational/04-transports-small-webrtc.py +++ b/examples/foundational/04-transports-small-webrtc.py @@ -27,9 +27,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMContextAggregatorPair, LLMUserAggregatorParams, ) -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import TransportParams from pipecat.transports.smallwebrtc.connection import IceServer, SmallWebRTCConnection from pipecat.transports.smallwebrtc.transport import SmallWebRTCTransport @@ -67,14 +67,14 @@ async def run_example(webrtc_connection: SmallWebRTCConnection): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/04a-transports-daily.py b/examples/foundational/04a-transports-daily.py index aaf8a3f0f..ab986c22f 100644 --- a/examples/foundational/04a-transports-daily.py +++ b/examples/foundational/04a-transports-daily.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMUserAggregatorParams, ) from pipecat.runner.daily import configure -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.daily.transport import DailyParams, DailyTransport load_dotenv(override=True) @@ -50,14 +50,14 @@ async def main(): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( model="gpt-4o", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), diff --git a/examples/foundational/04b-transports-livekit.py b/examples/foundational/04b-transports-livekit.py index 1f4709b0b..09262f767 100644 --- a/examples/foundational/04b-transports-livekit.py +++ b/examples/foundational/04b-transports-livekit.py @@ -29,9 +29,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMUserAggregatorParams, ) from pipecat.runner.livekit import configure -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.livekit.transport import LiveKitParams, LiveKitTransport load_dotenv(override=True) @@ -57,14 +57,14 @@ async def main(): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/05-sync-speech-and-image.py b/examples/foundational/05-sync-speech-and-image.py index 276d3a14a..1e4cf34a4 100644 --- a/examples/foundational/05-sync-speech-and-image.py +++ b/examples/foundational/05-sync-speech-and-image.py @@ -27,8 +27,8 @@ from pipecat.processors.aggregators.sentence import SentenceAggregator from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaHttpTTSService, CartesiaTTSSettings -from pipecat.services.fal.image import FalImageGenService, FalImageGenSettings +from pipecat.services.cartesia.tts import CartesiaHttpTTSService +from pipecat.services.fal.image import FalImageGenService from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -98,13 +98,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaHttpTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaHttpTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) imagegen = FalImageGenService( - settings=FalImageGenSettings( + settings=FalImageGenService.Settings( image_size="square_hd", ), aiohttp_session=session, diff --git a/examples/foundational/05a-local-sync-speech-and-image.py b/examples/foundational/05a-local-sync-speech-and-image.py index b06a2a8b0..d0c5a103a 100644 --- a/examples/foundational/05a-local-sync-speech-and-image.py +++ b/examples/foundational/05a-local-sync-speech-and-image.py @@ -28,8 +28,8 @@ from pipecat.pipeline.task import PipelineTask from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.sentence import SentenceAggregator from pipecat.processors.frame_processor import FrameDirection, FrameProcessor -from pipecat.services.cartesia.tts import CartesiaHttpTTSService, CartesiaTTSSettings -from pipecat.services.fal.image import FalImageGenService, FalImageGenSettings +from pipecat.services.cartesia.tts import CartesiaHttpTTSService +from pipecat.services.fal.image import FalImageGenService from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.local.tk import TkLocalTransport, TkTransportParams @@ -98,13 +98,13 @@ async def main(): tts = CartesiaHttpTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaHttpTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) imagegen = FalImageGenService( - settings=FalImageGenSettings( + settings=FalImageGenService.Settings( image_size="square_hd", ), aiohttp_session=session, diff --git a/examples/foundational/06-listen-and-respond.py b/examples/foundational/06-listen-and-respond.py index d2daff3fb..7a73ad876 100644 --- a/examples/foundational/06-listen-and-respond.py +++ b/examples/foundational/06-listen-and-respond.py @@ -28,9 +28,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -83,14 +83,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/06a-image-sync.py b/examples/foundational/06a-image-sync.py index 007a41143..3f80380dc 100644 --- a/examples/foundational/06a-image-sync.py +++ b/examples/foundational/06a-image-sync.py @@ -29,9 +29,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -100,14 +100,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07-interruptible-cartesia-http.py b/examples/foundational/07-interruptible-cartesia-http.py index 56a06f2e9..be6bc07a6 100644 --- a/examples/foundational/07-interruptible-cartesia-http.py +++ b/examples/foundational/07-interruptible-cartesia-http.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.cartesia.stt import CartesiaSTTService -from pipecat.services.cartesia.tts import CartesiaHttpTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaHttpTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -59,14 +59,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaHttpTTSService( api_key=os.getenv("CARTESIA_API_KEY"), aiohttp_session=session, - settings=CartesiaTTSSettings( + settings=CartesiaHttpTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07-interruptible.py b/examples/foundational/07-interruptible.py index cf9c5af96..6fa80d838 100644 --- a/examples/foundational/07-interruptible.py +++ b/examples/foundational/07-interruptible.py @@ -21,9 +21,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.services.tts_service import TextAggregationMode from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -56,14 +56,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07a-interruptible-speechmatics-vad.py b/examples/foundational/07a-interruptible-speechmatics-vad.py index 2ede06e4f..cece246d8 100644 --- a/examples/foundational/07a-interruptible-speechmatics-vad.py +++ b/examples/foundational/07a-interruptible-speechmatics-vad.py @@ -21,10 +21,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.openai.base_llm import OpenAILLMSettings from pipecat.services.openai.llm import OpenAILLMService -from pipecat.services.speechmatics.stt import SpeechmaticsSTTService, SpeechmaticsSTTSettings -from pipecat.services.speechmatics.tts import SpeechmaticsTTSService, SpeechmaticsTTSSettings +from pipecat.services.speechmatics.stt import SpeechmaticsSTTService +from pipecat.services.speechmatics.tts import SpeechmaticsTTSService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -93,7 +92,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): async with aiohttp.ClientSession() as session: stt = SpeechmaticsSTTService( api_key=os.getenv("SPEECHMATICS_API_KEY"), - settings=SpeechmaticsSTTSettings( + settings=SpeechmaticsSTTService.Settings( language=Language.EN, turn_detection_mode=SpeechmaticsSTTService.TurnDetectionMode.ADAPTIVE, # focus_speakers=["S1"], @@ -104,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = SpeechmaticsTTSService( api_key=os.getenv("SPEECHMATICS_API_KEY"), - settings=SpeechmaticsTTSSettings( + settings=SpeechmaticsTTSService.Settings( voice="sarah", ), aiohttp_session=session, @@ -112,7 +111,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( temperature=0.75, system_instruction="You are a helpful British assistant called Sarah. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Always include punctuation in your responses. Give very short replies - do not give longer replies unless strictly necessary. Respond to what the user said in a concise, funny, creative and helpful way. Use `` tags to identify different speakers - do not use tags in your replies. Do not respond to speakers within `` tags unless explicitly asked to.", ), diff --git a/examples/foundational/07a-interruptible-speechmatics.py b/examples/foundational/07a-interruptible-speechmatics.py index bee3410e3..3d6395f73 100644 --- a/examples/foundational/07a-interruptible-speechmatics.py +++ b/examples/foundational/07a-interruptible-speechmatics.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.openai.base_llm import OpenAILLMSettings from pipecat.services.openai.llm import OpenAILLMService -from pipecat.services.speechmatics.stt import SpeechmaticsSTTService, SpeechmaticsSTTSettings -from pipecat.services.speechmatics.tts import SpeechmaticsTTSService, SpeechmaticsTTSSettings +from pipecat.services.speechmatics.stt import SpeechmaticsSTTService +from pipecat.services.speechmatics.tts import SpeechmaticsTTSService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -76,7 +75,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): async with aiohttp.ClientSession() as session: stt = SpeechmaticsSTTService( api_key=os.getenv("SPEECHMATICS_API_KEY"), - settings=SpeechmaticsSTTSettings( + settings=SpeechmaticsSTTService.Settings( language=Language.EN, speaker_active_format="<{speaker_id}>{text}", ), @@ -84,7 +83,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = SpeechmaticsTTSService( api_key=os.getenv("SPEECHMATICS_API_KEY"), - settings=SpeechmaticsTTSSettings( + settings=SpeechmaticsTTSService.Settings( voice="sarah", ), aiohttp_session=session, @@ -92,7 +91,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( temperature=0.75, system_instruction="You are a helpful British assistant called Sarah. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Always include punctuation in your responses. Give very short replies - do not give longer replies unless strictly necessary. Respond to what the user said in a concise, funny, creative and helpful way. Use `` tags to identify different speakers - do not use tags in your replies. Do not respond to speakers within `` tags unless explicitly asked to.", ), diff --git a/examples/foundational/07b-interruptible-langchain.py b/examples/foundational/07b-interruptible-langchain.py index e7a5dc1b8..1a85bf7ad 100644 --- a/examples/foundational/07b-interruptible-langchain.py +++ b/examples/foundational/07b-interruptible-langchain.py @@ -28,7 +28,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.frameworks.langchain import LangchainProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -71,7 +71,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/07c-interruptible-deepgram-flux.py b/examples/foundational/07c-interruptible-deepgram-flux.py index a356a81cc..da027b4f8 100644 --- a/examples/foundational/07c-interruptible-deepgram-flux.py +++ b/examples/foundational/07c-interruptible-deepgram-flux.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.deepgram.flux.stt import DeepgramFluxSTTService, DeepgramFluxSTTSettings -from pipecat.services.deepgram.tts import DeepgramTTSService, DeepgramTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.deepgram.flux.stt import DeepgramFluxSTTService +from pipecat.services.deepgram.tts import DeepgramTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,21 +56,21 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = DeepgramFluxSTTService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramFluxSTTSettings( + settings=DeepgramFluxSTTService.Settings( min_confidence=0.3, ), ) tts = DeepgramTTSService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramTTSSettings( + settings=DeepgramTTSService.Settings( voice="aura-2-andromeda-en", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07c-interruptible-deepgram-http.py b/examples/foundational/07c-interruptible-deepgram-http.py index fa8b6712c..ee6733165 100644 --- a/examples/foundational/07c-interruptible-deepgram-http.py +++ b/examples/foundational/07c-interruptible-deepgram-http.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.deepgram.tts import DeepgramHttpTTSService, DeepgramTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.deepgram.tts import DeepgramHttpTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -59,7 +59,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = DeepgramHttpTTSService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramTTSSettings( + settings=DeepgramHttpTTSService.Settings( voice="aura-2-andromeda-en", ), aiohttp_session=session, @@ -67,7 +67,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07c-interruptible-deepgram-sagemaker.py b/examples/foundational/07c-interruptible-deepgram-sagemaker.py index b1c54a27e..91b1c95aa 100644 --- a/examples/foundational/07c-interruptible-deepgram-sagemaker.py +++ b/examples/foundational/07c-interruptible-deepgram-sagemaker.py @@ -24,10 +24,7 @@ from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.aws.llm import AWSBedrockLLMService, AWSBedrockLLMSettings from pipecat.services.deepgram.sagemaker.stt import DeepgramSageMakerSTTService -from pipecat.services.deepgram.sagemaker.tts import ( - DeepgramSageMakerTTSService, - DeepgramSageMakerTTSSettings, -) +from pipecat.services.deepgram.sagemaker.tts import DeepgramSageMakerTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -72,7 +69,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = DeepgramSageMakerTTSService( endpoint_name=os.getenv("SAGEMAKER_TTS_ENDPOINT_NAME"), region=os.getenv("AWS_REGION"), - settings=DeepgramSageMakerTTSSettings( + settings=DeepgramSageMakerTTSService.Settings( voice="aura-2-andromeda-en", ), ) diff --git a/examples/foundational/07c-interruptible-deepgram-vad.py b/examples/foundational/07c-interruptible-deepgram-vad.py index 7a0ccb441..0a4dc0125 100644 --- a/examples/foundational/07c-interruptible-deepgram-vad.py +++ b/examples/foundational/07c-interruptible-deepgram-vad.py @@ -21,9 +21,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.deepgram.stt import DeepgramSTTService, DeepgramSTTSettings -from pipecat.services.deepgram.tts import DeepgramTTSService, DeepgramTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.deepgram.stt import DeepgramSTTService +from pipecat.services.deepgram.tts import DeepgramTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,7 +55,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = DeepgramSTTService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramSTTSettings( + settings=DeepgramSTTService.Settings( vad_events=True, utterance_end_ms="1000", ), @@ -63,14 +63,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = DeepgramTTSService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramTTSSettings( + settings=DeepgramTTSService.Settings( voice="aura-2-andromeda-en", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07c-interruptible-deepgram.py b/examples/foundational/07c-interruptible-deepgram.py index 521890f68..e00a9f191 100644 --- a/examples/foundational/07c-interruptible-deepgram.py +++ b/examples/foundational/07c-interruptible-deepgram.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.deepgram.tts import DeepgramTTSService, DeepgramTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.deepgram.tts import DeepgramTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -57,14 +57,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = DeepgramTTSService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramTTSSettings( + settings=DeepgramTTSService.Settings( voice="aura-2-andromeda-en", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07d-interruptible-elevenlabs-http.py b/examples/foundational/07d-interruptible-elevenlabs-http.py index 279f6c8a2..cf60ac3e7 100644 --- a/examples/foundational/07d-interruptible-elevenlabs-http.py +++ b/examples/foundational/07d-interruptible-elevenlabs-http.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.elevenlabs.stt import ElevenLabsSTTService -from pipecat.services.elevenlabs.tts import ElevenLabsHttpTTSService, ElevenLabsHttpTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.elevenlabs.tts import ElevenLabsHttpTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -64,14 +64,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = ElevenLabsHttpTTSService( api_key=os.getenv("ELEVENLABS_API_KEY", ""), aiohttp_session=session, - settings=ElevenLabsHttpTTSSettings( + settings=ElevenLabsHttpTTSService.Settings( voice=os.getenv("ELEVENLABS_VOICE_ID", ""), ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07d-interruptible-elevenlabs.py b/examples/foundational/07d-interruptible-elevenlabs.py index 14e21e851..d14bc71cd 100644 --- a/examples/foundational/07d-interruptible-elevenlabs.py +++ b/examples/foundational/07d-interruptible-elevenlabs.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.elevenlabs.stt import ElevenLabsRealtimeSTTService -from pipecat.services.elevenlabs.tts import ElevenLabsTTSService, ElevenLabsTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.elevenlabs.tts import ElevenLabsTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -57,14 +57,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = ElevenLabsTTSService( api_key=os.getenv("ELEVENLABS_API_KEY", ""), - settings=ElevenLabsTTSSettings( + settings=ElevenLabsTTSService.Settings( voice=os.getenv("ELEVENLABS_VOICE_ID", ""), ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07f-interruptible-azure-http.py b/examples/foundational/07f-interruptible-azure-http.py index ec5068b25..38a2410fc 100644 --- a/examples/foundational/07f-interruptible-azure-http.py +++ b/examples/foundational/07f-interruptible-azure-http.py @@ -22,7 +22,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.azure.llm import AzureLLMService, AzureLLMSettings +from pipecat.services.azure.llm import AzureLLMService from pipecat.services.azure.stt import AzureSTTService from pipecat.services.azure.tts import AzureHttpTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -65,7 +65,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = AzureLLMService( api_key=os.getenv("AZURE_CHATGPT_API_KEY"), endpoint=os.getenv("AZURE_CHATGPT_ENDPOINT"), - settings=AzureLLMSettings( + settings=AzureLLMService.Settings( model=os.getenv("AZURE_CHATGPT_MODEL"), system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), diff --git a/examples/foundational/07f-interruptible-azure.py b/examples/foundational/07f-interruptible-azure.py index d905d59bb..b7ace8548 100644 --- a/examples/foundational/07f-interruptible-azure.py +++ b/examples/foundational/07f-interruptible-azure.py @@ -22,7 +22,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.azure.llm import AzureLLMService, AzureLLMSettings +from pipecat.services.azure.llm import AzureLLMService from pipecat.services.azure.stt import AzureSTTService from pipecat.services.azure.tts import AzureTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -65,7 +65,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = AzureLLMService( api_key=os.getenv("AZURE_CHATGPT_API_KEY"), endpoint=os.getenv("AZURE_CHATGPT_ENDPOINT"), - settings=AzureLLMSettings( + settings=AzureLLMService.Settings( model=os.getenv("AZURE_CHATGPT_MODEL"), system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), diff --git a/examples/foundational/07g-interruptible-openai-http.py b/examples/foundational/07g-interruptible-openai-http.py index ee0071bcb..127b9b0c0 100644 --- a/examples/foundational/07g-interruptible-openai-http.py +++ b/examples/foundational/07g-interruptible-openai-http.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.openai.stt import OpenAISTTService, OpenAISTTSettings -from pipecat.services.openai.tts import OpenAITTSService, OpenAITTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.openai.stt import OpenAISTTService +from pipecat.services.openai.tts import OpenAITTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,7 +54,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = OpenAISTTService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAISTTSettings( + settings=OpenAISTTService.Settings( model="gpt-4o-transcribe", prompt="Expect words related to dogs, such as breed names.", ), @@ -62,14 +62,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = OpenAITTSService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAITTSSettings( + settings=OpenAITTSService.Settings( voice="ballad", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are very knowledgable about dogs. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07g-interruptible-openai.py b/examples/foundational/07g-interruptible-openai.py index 89d57fa70..9b8fbea09 100644 --- a/examples/foundational/07g-interruptible-openai.py +++ b/examples/foundational/07g-interruptible-openai.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.openai.stt import OpenAIRealtimeSTTService, OpenAIRealtimeSTTSettings -from pipecat.services.openai.tts import OpenAITTSService, OpenAITTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.openai.stt import OpenAIRealtimeSTTService +from pipecat.services.openai.tts import OpenAITTSService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,7 +55,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = OpenAIRealtimeSTTService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAIRealtimeSTTSettings( + settings=OpenAIRealtimeSTTService.Settings( model="gpt-4o-transcribe", prompt="Expect words related to dogs, such as breed names.", language=Language.EN, @@ -64,14 +64,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = OpenAITTSService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAITTSSettings( + settings=OpenAITTSService.Settings( voice="ballad", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are very knowledgable about dogs. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07h-interruptible-openpipe.py b/examples/foundational/07h-interruptible-openpipe.py index f744fee4e..eaaa6fedd 100644 --- a/examples/foundational/07h-interruptible-openpipe.py +++ b/examples/foundational/07h-interruptible-openpipe.py @@ -23,9 +23,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openpipe.llm import OpenPipeLLMService, OpenPipeLLMSettings +from pipecat.services.openpipe.llm import OpenPipeLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -57,7 +57,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -67,7 +67,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): api_key=os.getenv("OPENAI_API_KEY"), openpipe_api_key=os.getenv("OPENPIPE_API_KEY"), tags={"conversation_id": f"pipecat-{timestamp}"}, - settings=OpenPipeLLMSettings( + settings=OpenPipeLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07i-interruptible-xtts.py b/examples/foundational/07i-interruptible-xtts.py index c5bb61419..3246d5da9 100644 --- a/examples/foundational/07i-interruptible-xtts.py +++ b/examples/foundational/07i-interruptible-xtts.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.xtts.tts import XTTSService, XTTSTTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.xtts.tts import XTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -59,7 +59,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = XTTSService( aiohttp_session=session, - settings=XTTSTTSSettings( + settings=XTTSService.Settings( voice="Claribel Dervla", ), base_url="http://localhost:8000", @@ -67,7 +67,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07j-interruptible-gladia-vad.py b/examples/foundational/07j-interruptible-gladia-vad.py index ca2687d43..b25ab7275 100644 --- a/examples/foundational/07j-interruptible-gladia-vad.py +++ b/examples/foundational/07j-interruptible-gladia-vad.py @@ -22,10 +22,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.gladia.config import LanguageConfig -from pipecat.services.gladia.stt import GladiaSTTService, GladiaSTTSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.gladia.stt import GladiaSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -58,7 +58,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = GladiaSTTService( api_key=os.getenv("GLADIA_API_KEY", ""), region=os.getenv("GLADIA_REGION"), - settings=GladiaSTTSettings( + settings=GladiaSTTService.Settings( language_config=LanguageConfig( languages=[Language.EN], ), @@ -68,14 +68,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY", ""), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY", ""), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07j-interruptible-gladia.py b/examples/foundational/07j-interruptible-gladia.py index 42ee1b1cc..d1fee759b 100644 --- a/examples/foundational/07j-interruptible-gladia.py +++ b/examples/foundational/07j-interruptible-gladia.py @@ -22,10 +22,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.gladia.config import LanguageConfig -from pipecat.services.gladia.stt import GladiaSTTService, GladiaSTTSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.gladia.stt import GladiaSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -57,7 +57,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = GladiaSTTService( api_key=os.getenv("GLADIA_API_KEY", ""), region=os.getenv("GLADIA_REGION"), - settings=GladiaSTTSettings( + settings=GladiaSTTService.Settings( language_config=LanguageConfig( languages=[Language.EN], ) @@ -66,14 +66,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY", ""), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY", ""), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07k-interruptible-lmnt.py b/examples/foundational/07k-interruptible-lmnt.py index 091b72499..a41f1ae2e 100644 --- a/examples/foundational/07k-interruptible-lmnt.py +++ b/examples/foundational/07k-interruptible-lmnt.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.lmnt.tts import LmntTTSService, LmntTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.lmnt.tts import LmntTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,14 +56,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = LmntTTSService( api_key=os.getenv("LMNT_API_KEY"), - settings=LmntTTSSettings( + settings=LmntTTSService.Settings( voice="morgan", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07l-interruptible-groq.py b/examples/foundational/07l-interruptible-groq.py index 8d2125546..208d39c2d 100644 --- a/examples/foundational/07l-interruptible-groq.py +++ b/examples/foundational/07l-interruptible-groq.py @@ -22,7 +22,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.groq.llm import GroqLLMService, GroqLLMSettings +from pipecat.services.groq.llm import GroqLLMService from pipecat.services.groq.stt import GroqSTTService from pipecat.services.groq.tts import GroqTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GroqLLMService( api_key=os.getenv("GROQ_API_KEY"), - settings=GroqLLMSettings( + settings=GroqLLMService.Settings( model="meta-llama/llama-4-maverick-17b-128e-instruct", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), diff --git a/examples/foundational/07m-interruptible-aws-strands.py b/examples/foundational/07m-interruptible-aws-strands.py index e5c6f6f01..5d7b5fc8e 100644 --- a/examples/foundational/07m-interruptible-aws-strands.py +++ b/examples/foundational/07m-interruptible-aws-strands.py @@ -22,7 +22,7 @@ from pipecat.processors.frameworks.strands_agents import StrandsAgentsProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.aws.stt import AWSTranscribeSTTService -from pipecat.services.aws.tts import AWSPollyTTSService, AWSPollyTTSSettings +from pipecat.services.aws.tts import AWSPollyTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -95,7 +95,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = AWSPollyTTSService( region="us-west-2", # only specific regions support generative TTS - settings=AWSPollyTTSSettings( + settings=AWSPollyTTSService.Settings( voice="Joanna", engine="generative", rate="1.1", diff --git a/examples/foundational/07m-interruptible-aws.py b/examples/foundational/07m-interruptible-aws.py index 8ddec82ef..ff3b6a789 100644 --- a/examples/foundational/07m-interruptible-aws.py +++ b/examples/foundational/07m-interruptible-aws.py @@ -20,9 +20,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.aws.llm import AWSBedrockLLMService, AWSBedrockLLMSettings +from pipecat.services.aws.llm import AWSBedrockLLMService from pipecat.services.aws.stt import AWSTranscribeSTTService -from pipecat.services.aws.tts import AWSPollyTTSService, AWSPollyTTSSettings +from pipecat.services.aws.tts import AWSPollyTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,7 +54,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = AWSPollyTTSService( region="us-west-2", # only specific regions support generative TTS - settings=AWSPollyTTSSettings( + settings=AWSPollyTTSService.Settings( voice="Joanna", engine="generative", rate="1.1", @@ -63,7 +63,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = AWSBedrockLLMService( aws_region="us-west-2", - settings=AWSBedrockLLMSettings( + settings=AWSBedrockLLMService.Settings( model="us.anthropic.claude-sonnet-4-6", temperature=0.8, system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", diff --git a/examples/foundational/07n-interruptible-gemini-image.py b/examples/foundational/07n-interruptible-gemini-image.py index 8369f1de6..ad292ab03 100644 --- a/examples/foundational/07n-interruptible-gemini-image.py +++ b/examples/foundational/07n-interruptible-gemini-image.py @@ -37,9 +37,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings -from pipecat.services.google.stt import GoogleSTTService, GoogleSTTSettings -from pipecat.services.google.tts import GoogleTTSService, GoogleTTSSettings +from pipecat.services.google.llm import GoogleLLMService +from pipecat.services.google.stt import GoogleSTTService +from pipecat.services.google.tts import GoogleTTSService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -71,14 +71,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = GoogleSTTService( credentials=os.getenv("GOOGLE_TEST_CREDENTIALS"), - settings=GoogleSTTSettings( + settings=GoogleSTTService.Settings( languages=[Language.EN_US], ), ) tts = GoogleTTSService( credentials=os.getenv("GOOGLE_TEST_CREDENTIALS"), - settings=GoogleTTSSettings( + settings=GoogleTTSService.Settings( voice="en-US-Chirp3-HD-Charon", language=Language.EN_US, ), @@ -86,7 +86,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( model="gemini-2.5-flash-image", # model="gemini-3-pro-image-preview", # A more powerful model, but slower, system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", diff --git a/examples/foundational/07n-interruptible-gemini.py b/examples/foundational/07n-interruptible-gemini.py index 92220bce5..3d8857708 100644 --- a/examples/foundational/07n-interruptible-gemini.py +++ b/examples/foundational/07n-interruptible-gemini.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings -from pipecat.services.google.stt import GoogleSTTService, GoogleSTTSettings -from pipecat.services.google.tts import GeminiTTSService, GeminiTTSSettings +from pipecat.services.google.llm import GoogleLLMService +from pipecat.services.google.stt import GoogleSTTService +from pipecat.services.google.tts import GeminiTTSService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -54,7 +54,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info(f"Starting bot with Gemini TTS") stt = GoogleSTTService( - settings=GoogleSTTSettings( + settings=GoogleSTTService.Settings( languages=[Language.EN_US], ), credentials=os.getenv("GOOGLE_TEST_CREDENTIALS"), @@ -62,7 +62,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = GeminiTTSService( credentials=os.getenv("GOOGLE_TEST_CREDENTIALS"), - settings=GeminiTTSSettings( + settings=GeminiTTSService.Settings( model="gemini-2.5-flash-tts", voice="Charon", language=Language.EN_US, @@ -73,7 +73,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), model="gemini-2.5-flash", - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( system_instruction="""You are a helpful AI assistant in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. IMPORTANT: You're using Gemini TTS which supports expressive markup tags. You can use these tags in your responses: diff --git a/examples/foundational/07n-interruptible-google-http.py b/examples/foundational/07n-interruptible-google-http.py index b137bcd7f..91e822ec0 100644 --- a/examples/foundational/07n-interruptible-google-http.py +++ b/examples/foundational/07n-interruptible-google-http.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings -from pipecat.services.google.stt import GoogleSTTService, GoogleSTTSettings -from pipecat.services.google.tts import GoogleHttpTTSService, GoogleHttpTTSSettings +from pipecat.services.google.llm import GoogleLLMService +from pipecat.services.google.stt import GoogleSTTService +from pipecat.services.google.tts import GoogleHttpTTSService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -54,7 +54,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info(f"Starting bot") stt = GoogleSTTService( - settings=GoogleSTTSettings( + settings=GoogleSTTService.Settings( languages=[Language.EN_US], # Add model to use a specific model # model="chirp_3", @@ -64,7 +64,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) tts = GoogleHttpTTSService( - settings=GoogleHttpTTSSettings( + settings=GoogleHttpTTSService.Settings( voice="en-US-Chirp3-HD-Charon", language=Language.EN_US, ), @@ -73,7 +73,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.GoogleLLMSettings( model="gemini-2.5-flash", # force a certain amount of thinking if you want it # thinking=GoogleLLMService.ThinkingConfig(thinking_budget=4096) diff --git a/examples/foundational/07n-interruptible-google.py b/examples/foundational/07n-interruptible-google.py index 4f5409085..2f148bb13 100644 --- a/examples/foundational/07n-interruptible-google.py +++ b/examples/foundational/07n-interruptible-google.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings -from pipecat.services.google.stt import GoogleSTTService, GoogleSTTSettings -from pipecat.services.google.tts import GoogleTTSService, GoogleTTSSettings +from pipecat.services.google.llm import GoogleLLMService +from pipecat.services.google.stt import GoogleSTTService +from pipecat.services.google.tts import GoogleTTSService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -54,7 +54,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info(f"Starting bot") stt = GoogleSTTService( - settings=GoogleSTTSettings( + settings=GoogleSTTService.Settings( languages=[Language.EN_US], # Add model to use a specific model # model="chirp_3", @@ -64,7 +64,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) tts = GoogleTTSService( - settings=GoogleTTSSettings( + settings=GoogleTTSService.Settings( voice="en-US-Chirp3-HD-Charon", language=Language.EN_US, ), @@ -73,7 +73,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( model="gemini-2.5-flash", # force a certain amount of thinking if you want it # thinking=GoogleLLMService.ThinkingConfig(thinking_budget=4096), diff --git a/examples/foundational/07o-interruptible-assemblyai-turn-detection.py b/examples/foundational/07o-interruptible-assemblyai-turn-detection.py index 2c2ca5419..7f8c8169e 100644 --- a/examples/foundational/07o-interruptible-assemblyai-turn-detection.py +++ b/examples/foundational/07o-interruptible-assemblyai-turn-detection.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.assemblyai.stt import AssemblyAISTTService, AssemblyAISTTSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.assemblyai.stt import AssemblyAISTTService +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -93,7 +93,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = AssemblyAISTTService( api_key=os.getenv("ASSEMBLYAI_API_KEY"), vad_force_turn_endpoint=False, # Use AssemblyAI's built-in turn detection - settings=AssemblyAISTTSettings( + settings=AssemblyAISTTService.Settings( model="u3-rt-pro", # Optional: Tune turn detection timing (defaults shown below) # min_turn_silence=100, # Default @@ -107,14 +107,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07o-interruptible-assemblyai.py b/examples/foundational/07o-interruptible-assemblyai.py index 9b60f3e98..700ec404e 100644 --- a/examples/foundational/07o-interruptible-assemblyai.py +++ b/examples/foundational/07o-interruptible-assemblyai.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.assemblyai.stt import AssemblyAISTTService -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -59,14 +59,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07p-interruptible-krisp-viva.py b/examples/foundational/07p-interruptible-krisp-viva.py index 67a29bd89..b9eda804c 100644 --- a/examples/foundational/07p-interruptible-krisp-viva.py +++ b/examples/foundational/07p-interruptible-krisp-viva.py @@ -43,9 +43,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -85,14 +85,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07p-interruptible-krisp.py b/examples/foundational/07p-interruptible-krisp.py index 5b760e768..800bc6fbc 100644 --- a/examples/foundational/07p-interruptible-krisp.py +++ b/examples/foundational/07p-interruptible-krisp.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.deepgram.tts import DeepgramTTSService, DeepgramTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.deepgram.tts import DeepgramTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -60,14 +60,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = DeepgramTTSService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramTTSSettings( + settings=DeepgramTTSService.Settings( voice="aura-helios-en", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07q-interruptible-rime-http.py b/examples/foundational/07q-interruptible-rime-http.py index 8324d546e..f143ee287 100644 --- a/examples/foundational/07q-interruptible-rime-http.py +++ b/examples/foundational/07q-interruptible-rime-http.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.rime.tts import RimeHttpTTSService, RimeTTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.rime.tts import RimeHttpTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -60,7 +60,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = RimeHttpTTSService( api_key=os.getenv("RIME_API_KEY", ""), - settings=RimeTTSSettings( + settings=RimeHttpTTSService.Settings( voice="luna", model="arcana", ), @@ -70,7 +70,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07q-interruptible-rime.py b/examples/foundational/07q-interruptible-rime.py index 5379e9914..dde507ee1 100644 --- a/examples/foundational/07q-interruptible-rime.py +++ b/examples/foundational/07q-interruptible-rime.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.rime.tts import RimeTTSService, RimeTTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.rime.tts import RimeTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,14 +56,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = RimeTTSService( api_key=os.getenv("RIME_API_KEY", ""), - settings=RimeTTSSettings( + settings=RimeTTSService.Settings( voice="luna", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07r-interruptible-nvidia.py b/examples/foundational/07r-interruptible-nvidia.py index 70c151f11..2e69dd50f 100644 --- a/examples/foundational/07r-interruptible-nvidia.py +++ b/examples/foundational/07r-interruptible-nvidia.py @@ -22,7 +22,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.nvidia.llm import NvidiaLLMService, NvidiaLLMSettings +from pipecat.services.nvidia.llm import NvidiaLLMService from pipecat.services.nvidia.stt import NvidiaSTTService from pipecat.services.nvidia.tts import NvidiaTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = NvidiaLLMService( api_key=os.getenv("NVIDIA_API_KEY"), - settings=NvidiaLLMSettings( + settings=NvidiaLLMService.Settings( model="meta/llama-3.3-70b-instruct", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), diff --git a/examples/foundational/07s-interruptible-google-audio-in.py b/examples/foundational/07s-interruptible-google-audio-in.py index 31bfbcc35..6de7e1966 100644 --- a/examples/foundational/07s-interruptible-google-audio-in.py +++ b/examples/foundational/07s-interruptible-google-audio-in.py @@ -36,8 +36,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.frame_processor import FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings -from pipecat.services.google.tts import GoogleTTSService, GoogleTTSSettings +from pipecat.services.google.llm import GoogleLLMService +from pipecat.services.google.tts import GoogleTTSService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -216,7 +216,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( model="gemini-2.5-flash", system_instruction=system_message, # force a certain amount of thinking if you want it @@ -225,7 +225,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) tts = GoogleTTSService( - settings=GoogleTTSSettings( + settings=GoogleTTSService.Settings( voice="en-US-Chirp3-HD-Charon", language=Language.EN_US, ), diff --git a/examples/foundational/07t-interruptible-fish.py b/examples/foundational/07t-interruptible-fish.py index caeab20c6..d51e3a71e 100644 --- a/examples/foundational/07t-interruptible-fish.py +++ b/examples/foundational/07t-interruptible-fish.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.fish.tts import FishAudioTTSService, FishAudioTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.fish.tts import FishAudioTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -57,14 +57,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = FishAudioTTSService( api_key=os.getenv("FISH_API_KEY"), - settings=FishAudioTTSSettings( + settings=FishAudioTTSService.Settings( voice="4ce7e917cedd4bc2bb2e6ff3a46acaa1", # Barack Obama ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07v-interruptible-neuphonic-http.py b/examples/foundational/07v-interruptible-neuphonic-http.py index 8ebfe9002..bc2bbe983 100644 --- a/examples/foundational/07v-interruptible-neuphonic-http.py +++ b/examples/foundational/07v-interruptible-neuphonic-http.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.neuphonic.tts import NeuphonicHttpTTSService, NeuphonicTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.neuphonic.tts import NeuphonicHttpTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -60,7 +60,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = NeuphonicHttpTTSService( api_key=os.getenv("NEUPHONIC_API_KEY"), - settings=NeuphonicTTSSettings( + settings=NeuphonicHttpTTSService.Settings( voice="fc854436-2dac-4d21-aa69-ae17b54e98eb", # Emily ), aiohttp_session=session, @@ -68,7 +68,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07v-interruptible-neuphonic.py b/examples/foundational/07v-interruptible-neuphonic.py index 8eee009f3..b44632286 100644 --- a/examples/foundational/07v-interruptible-neuphonic.py +++ b/examples/foundational/07v-interruptible-neuphonic.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.neuphonic.tts import NeuphonicTTSService, NeuphonicTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.neuphonic.tts import NeuphonicTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,14 +56,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = NeuphonicTTSService( api_key=os.getenv("NEUPHONIC_API_KEY"), - settings=NeuphonicTTSSettings( + settings=NeuphonicTTSService.Settings( voice="fc854436-2dac-4d21-aa69-ae17b54e98eb", # Emily ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07w-interruptible-fal.py b/examples/foundational/07w-interruptible-fal.py index 81045df5f..89a38d23c 100644 --- a/examples/foundational/07w-interruptible-fal.py +++ b/examples/foundational/07w-interruptible-fal.py @@ -23,9 +23,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.fal.stt import FalSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -62,14 +62,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07x-interruptible-local.py b/examples/foundational/07x-interruptible-local.py index 0e5107890..e0ace854b 100644 --- a/examples/foundational/07x-interruptible-local.py +++ b/examples/foundational/07x-interruptible-local.py @@ -21,9 +21,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMContextAggregatorPair, LLMUserAggregatorParams, ) -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.local.audio import LocalAudioTransport, LocalAudioTransportParams load_dotenv(override=True) @@ -44,14 +44,14 @@ async def main(): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07y-interruptible-minimax.py b/examples/foundational/07y-interruptible-minimax.py index 64fe7da06..d9bcef371 100644 --- a/examples/foundational/07y-interruptible-minimax.py +++ b/examples/foundational/07y-interruptible-minimax.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.minimax.tts import MiniMaxHttpTTSService, MiniMaxTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.minimax.tts import MiniMaxHttpTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -63,14 +63,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): api_key=os.getenv("MINIMAX_API_KEY", ""), group_id=os.getenv("MINIMAX_GROUP_ID", ""), aiohttp_session=session, - settings=MiniMaxTTSSettings( + settings=MiniMaxHttpTTSService.Settings( language=Language.EN, ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07z-interruptible-sarvam-http.py b/examples/foundational/07z-interruptible-sarvam-http.py index ac6ece100..76c892fd9 100644 --- a/examples/foundational/07z-interruptible-sarvam-http.py +++ b/examples/foundational/07z-interruptible-sarvam-http.py @@ -23,9 +23,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.sarvam.stt import SarvamSTTService, SarvamSTTSettings -from pipecat.services.sarvam.tts import SarvamHttpTTSService, SarvamHttpTTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.sarvam.stt import SarvamSTTService +from pipecat.services.sarvam.tts import SarvamHttpTTSService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -59,7 +59,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): async with aiohttp.ClientSession() as session: stt = SarvamSTTService( api_key=os.getenv("SARVAM_API_KEY"), - settings=SarvamSTTSettings( + settings=SarvamSTTService.Settings( model="saarika:v2.5", ), ) @@ -67,14 +67,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = SarvamHttpTTSService( api_key=os.getenv("SARVAM_API_KEY"), aiohttp_session=session, - settings=SarvamHttpTTSSettings( + settings=SarvamHttpTTSService.Settings( language=Language.EN_IN, ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07z-interruptible-sarvam.py b/examples/foundational/07z-interruptible-sarvam.py index e366b4d31..915ea2c3d 100644 --- a/examples/foundational/07z-interruptible-sarvam.py +++ b/examples/foundational/07z-interruptible-sarvam.py @@ -21,9 +21,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.sarvam.stt import SarvamSTTService, SarvamSTTSettings -from pipecat.services.sarvam.tts import SarvamTTSService, SarvamTTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.sarvam.stt import SarvamSTTService +from pipecat.services.sarvam.tts import SarvamTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,21 +54,21 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = SarvamSTTService( api_key=os.getenv("SARVAM_API_KEY"), - settings=SarvamSTTSettings( + settings=SarvamSTTService.Settings( model="saarika:v2.5", ), ) tts = SarvamTTSService( api_key=os.getenv("SARVAM_API_KEY"), - settings=SarvamTTSSettings( + settings=SarvamTTSService.Settings( model="bulbul:v2", voice="manisha", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07za-interruptible-soniox.py b/examples/foundational/07za-interruptible-soniox.py index 71011c5d9..d425be966 100644 --- a/examples/foundational/07za-interruptible-soniox.py +++ b/examples/foundational/07za-interruptible-soniox.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.soniox.stt import SonioxSTTService, SonioxSTTSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.soniox.stt import SonioxSTTService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -53,7 +53,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = SonioxSTTService( api_key=os.getenv("SONIOX_API_KEY"), - settings=SonioxSTTSettings( + settings=SonioxSTTService.Settings( # Add language hints to use a specific language # Add strict mode to enforce the language hints language_hints=[Language.EN], @@ -63,14 +63,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07zb-interruptible-inworld-http.py b/examples/foundational/07zb-interruptible-inworld-http.py index 6e57fbb56..9f0027b42 100644 --- a/examples/foundational/07zb-interruptible-inworld-http.py +++ b/examples/foundational/07zb-interruptible-inworld-http.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.inworld.tts import InworldHttpTTSService, InworldTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.inworld.tts import InworldHttpTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_output import BaseOutputTransport from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -59,7 +59,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): api_key=os.getenv("INWORLD_API_KEY", ""), aiohttp_session=session, streaming=True, - settings=InworldTTSSettings( + settings=InworldHttpTTSService.Settings( voice="Ashley", model="inworld-tts-1", ), @@ -68,7 +68,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful AI demonstrating Inworld AI's TTS. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a friendly and helpful way.", ), ) diff --git a/examples/foundational/07zb-interruptible-inworld.py b/examples/foundational/07zb-interruptible-inworld.py index 6e2cd7aed..9f9384554 100644 --- a/examples/foundational/07zb-interruptible-inworld.py +++ b/examples/foundational/07zb-interruptible-inworld.py @@ -22,8 +22,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.inworld.tts import InworldTTSService, InworldTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.inworld.tts import InworldTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,7 +54,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = InworldTTSService( api_key=os.getenv("INWORLD_API_KEY", ""), - settings=InworldTTSSettings( + settings=InworldTTSService.Settings( voice="Ashley", model="inworld-tts-1", temperature=1.1, @@ -63,7 +63,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful AI demonstrating Inworld AI's TTS. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a friendly and helpful way.", ), ) diff --git a/examples/foundational/07zc-interruptible-asyncai-http.py b/examples/foundational/07zc-interruptible-asyncai-http.py index 1fe69c38b..e95bd60b2 100644 --- a/examples/foundational/07zc-interruptible-asyncai-http.py +++ b/examples/foundational/07zc-interruptible-asyncai-http.py @@ -23,9 +23,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.asyncai.tts import AsyncAIHttpTTSService, AsyncAITTSSettings +from pipecat.services.asyncai.tts import AsyncAIHttpTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -60,7 +60,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = AsyncAIHttpTTSService( api_key=os.getenv("ASYNCAI_API_KEY", ""), - settings=AsyncAITTSSettings( + settings=AsyncAIHttpTTSService.Settings( voice="e0f39dc4-f691-4e78-bba5-5c636692cc04", ), aiohttp_session=session, @@ -68,7 +68,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07zc-interruptible-asyncai.py b/examples/foundational/07zc-interruptible-asyncai.py index 05113cdb9..40cdcf7ab 100644 --- a/examples/foundational/07zc-interruptible-asyncai.py +++ b/examples/foundational/07zc-interruptible-asyncai.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.asyncai.tts import AsyncAITTSService, AsyncAITTSSettings +from pipecat.services.asyncai.tts import AsyncAITTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -57,14 +57,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = AsyncAITTSService( api_key=os.getenv("ASYNCAI_API_KEY", ""), - settings=AsyncAITTSSettings( + settings=AsyncAITTSService.Settings( voice="e0f39dc4-f691-4e78-bba5-5c636692cc04", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07zd-interruptible-aicoustics.py b/examples/foundational/07zd-interruptible-aicoustics.py index e8f55e4e0..923530943 100644 --- a/examples/foundational/07zd-interruptible-aicoustics.py +++ b/examples/foundational/07zd-interruptible-aicoustics.py @@ -25,9 +25,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.audio.audio_buffer_processor import AudioBufferProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -77,14 +77,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07ze-interruptible-hume.py b/examples/foundational/07ze-interruptible-hume.py index fbe752a7d..ef19e3619 100644 --- a/examples/foundational/07ze-interruptible-hume.py +++ b/examples/foundational/07ze-interruptible-hume.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.hume.tts import HUME_SAMPLE_RATE, HumeTTSService, HumeTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.hume.tts import HUME_SAMPLE_RATE, HumeTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_output import BaseOutputTransport from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -59,14 +59,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = HumeTTSService( api_key=os.getenv("HUME_API_KEY"), # Replace with your Hume voice ID - settings=HumeTTSSettings( + settings=HumeTTSService.Settings( voice="f898a92e-685f-43fa-985b-a46920f0650b", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07zf-interruptible-gradium.py b/examples/foundational/07zf-interruptible-gradium.py index 41cdcd799..4b7e2f32b 100644 --- a/examples/foundational/07zf-interruptible-gradium.py +++ b/examples/foundational/07zf-interruptible-gradium.py @@ -21,9 +21,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.gradium.stt import GradiumSTTService, GradiumSTTSettings -from pipecat.services.gradium.tts import GradiumTTSService, GradiumTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.gradium.stt import GradiumSTTService +from pipecat.services.gradium.tts import GradiumTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,7 +55,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = GradiumSTTService( api_key=os.getenv("GRADIUM_API_KEY"), api_endpoint_base_url="wss://us.api.gradium.ai/api/speech/asr", - settings=GradiumSTTSettings( + settings=GradiumSTTService.Settings( language=Language.EN, ), ) @@ -63,14 +63,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = GradiumTTSService( api_key=os.getenv("GRADIUM_API_KEY"), url="wss://us.api.gradium.ai/api/speech/tts", - settings=GradiumTTSSettings( + settings=GradiumTTSService.Settings( voice="YTpq7expH9539ERJ", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07zg-interruptible-camb.py b/examples/foundational/07zg-interruptible-camb.py index 20bc8b665..e0f764f4e 100644 --- a/examples/foundational/07zg-interruptible-camb.py +++ b/examples/foundational/07zg-interruptible-camb.py @@ -21,9 +21,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.camb.tts import CambTTSService, CambTTSSettings +from pipecat.services.camb.tts import CambTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,14 +56,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CambTTSService( api_key=os.getenv("CAMB_API_KEY"), - settings=CambTTSSettings( + settings=CambTTSService.Settings( model="mars-flash", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful voice assistant powered by Camb AI text-to-speech. ", ), ) diff --git a/examples/foundational/07zi-interruptible-piper.py b/examples/foundational/07zi-interruptible-piper.py index f6d9bfeea..44b7d0efd 100644 --- a/examples/foundational/07zi-interruptible-piper.py +++ b/examples/foundational/07zi-interruptible-piper.py @@ -22,8 +22,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.piper.tts import PiperTTSService, PiperTTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.piper.tts import PiperTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY")) tts = PiperTTSService( - settings=PiperTTSSettings( + settings=PiperTTSService.Settings( voice="en_US-ryan-high", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07zj-interruptible-kokoro.py b/examples/foundational/07zj-interruptible-kokoro.py index da35b5d5c..0978ba720 100644 --- a/examples/foundational/07zj-interruptible-kokoro.py +++ b/examples/foundational/07zj-interruptible-kokoro.py @@ -22,8 +22,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.kokoro.tts import KokoroTTSService, KokoroTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.kokoro.tts import KokoroTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY")) tts = KokoroTTSService( - settings=KokoroTTSSettings( + settings=KokoroTTSService.Settings( voice="af_heart", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/07zk-interruptible-resemble.py b/examples/foundational/07zk-interruptible-resemble.py index c186db6be..88bcb724e 100644 --- a/examples/foundational/07zk-interruptible-resemble.py +++ b/examples/foundational/07zk-interruptible-resemble.py @@ -22,8 +22,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.resembleai.tts import ResembleAITTSService, ResembleAITTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.resembleai.tts import ResembleAITTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -59,14 +59,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = ResembleAITTSService( api_key=os.getenv("RESEMBLE_API_KEY"), - settings=ResembleAITTSSettings( + settings=ResembleAITTSService.Settings( voice=os.getenv("RESEMBLE_VOICE_UUID"), ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/08-custom-frame-processor.py b/examples/foundational/08-custom-frame-processor.py index 507de6d41..b6b1ef42c 100644 --- a/examples/foundational/08-custom-frame-processor.py +++ b/examples/foundational/08-custom-frame-processor.py @@ -26,9 +26,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -95,14 +95,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/10-wake-phrase.py b/examples/foundational/10-wake-phrase.py index 04a1e40b8..44b580ad5 100644 --- a/examples/foundational/10-wake-phrase.py +++ b/examples/foundational/10-wake-phrase.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.filters.wake_check_filter import WakeCheckFilter from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,14 +56,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful assistant. Respond to what the user said in a creative and helpful way. Keep your responses brief.", ), ) diff --git a/examples/foundational/11-sound-effects.py b/examples/foundational/11-sound-effects.py index 664bd122c..87cb3f333 100644 --- a/examples/foundational/11-sound-effects.py +++ b/examples/foundational/11-sound-effects.py @@ -30,9 +30,9 @@ from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.processors.logger import FrameLogger from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -106,14 +106,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/12-describe-image-openai.py b/examples/foundational/12-describe-image-openai.py index d9b0be871..0888fa6bf 100644 --- a/examples/foundational/12-describe-image-openai.py +++ b/examples/foundational/12-describe-image-openai.py @@ -23,9 +23,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -53,14 +53,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way. You are also able to describe images.", ), ) diff --git a/examples/foundational/12a-describe-image-anthropic.py b/examples/foundational/12a-describe-image-anthropic.py index 5a10f24a5..086e282dc 100644 --- a/examples/foundational/12a-describe-image-anthropic.py +++ b/examples/foundational/12a-describe-image-anthropic.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.anthropic.llm import AnthropicLLMService, AnthropicLLMSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.anthropic.llm import AnthropicLLMService +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -53,14 +53,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = AnthropicLLMService( api_key=os.getenv("ANTHROPIC_API_KEY"), - settings=AnthropicLLMSettings( + settings=AnthropicLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way. You are also able to describe images.", ), ) diff --git a/examples/foundational/12b-describe-image-aws.py b/examples/foundational/12b-describe-image-aws.py index 86ec2e66d..d42bc6ef0 100644 --- a/examples/foundational/12b-describe-image-aws.py +++ b/examples/foundational/12b-describe-image-aws.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.aws.llm import AWSBedrockLLMService, AWSBedrockLLMSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.aws.llm import AWSBedrockLLMService +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -53,14 +53,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = AWSBedrockLLMService( aws_region="us-west-2", - settings=AWSBedrockLLMSettings( + settings=AWSBedrockLLMService.Settings( model="us.anthropic.claude-sonnet-4-6", temperature=0.8, system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way. You are also able to describe images.", diff --git a/examples/foundational/12c-describe-image-gemini-flash.py b/examples/foundational/12c-describe-image-gemini-flash.py index 2e76eff19..acb481d3e 100644 --- a/examples/foundational/12c-describe-image-gemini-flash.py +++ b/examples/foundational/12c-describe-image-gemini-flash.py @@ -23,9 +23,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings +from pipecat.services.google.llm import GoogleLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -53,14 +53,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way. You are also able to describe images.", ), ) diff --git a/examples/foundational/12d-describe-image-moondream.py b/examples/foundational/12d-describe-image-moondream.py index 21fc79ed5..6a73de7b3 100644 --- a/examples/foundational/12d-describe-image-moondream.py +++ b/examples/foundational/12d-describe-image-moondream.py @@ -17,7 +17,7 @@ from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.moondream.vision import MoondreamService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -42,7 +42,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/13b-deepgram-transcription.py b/examples/foundational/13b-deepgram-transcription.py index 61ba5c266..04246d237 100644 --- a/examples/foundational/13b-deepgram-transcription.py +++ b/examples/foundational/13b-deepgram-transcription.py @@ -16,7 +16,7 @@ from pipecat.pipeline.task import PipelineTask from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.deepgram.stt import DeepgramSTTService, DeepgramSTTSettings, Language +from pipecat.services.deepgram.stt import DeepgramSTTService, Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -49,7 +49,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = DeepgramSTTService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramSTTSettings( + settings=DeepgramSTTService.Settings( language=Language.EN, ), ) diff --git a/examples/foundational/13c-gladia-translation.py b/examples/foundational/13c-gladia-translation.py index 9f7b6a6da..e6557cd15 100644 --- a/examples/foundational/13c-gladia-translation.py +++ b/examples/foundational/13c-gladia-translation.py @@ -17,12 +17,11 @@ from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.gladia.config import ( - GladiaInputParams, LanguageConfig, RealtimeProcessingConfig, TranslationConfig, ) -from pipecat.services.gladia.stt import GladiaSTTService, GladiaSTTSettings +from pipecat.services.gladia.stt import GladiaSTTService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -59,7 +58,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = GladiaSTTService( api_key=os.getenv("GLADIA_API_KEY"), region=os.getenv("GLADIA_REGION"), - settings=GladiaSTTSettings( + settings=GladiaSTTService.Settings( language_config=LanguageConfig( languages=[Language.EN], code_switching=False, diff --git a/examples/foundational/13d-assemblyai-transcription.py b/examples/foundational/13d-assemblyai-transcription.py index c4ca9cd6b..f50f63380 100644 --- a/examples/foundational/13d-assemblyai-transcription.py +++ b/examples/foundational/13d-assemblyai-transcription.py @@ -16,7 +16,7 @@ from pipecat.pipeline.task import PipelineTask from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.assemblyai.stt import AssemblyAISTTService, AssemblyAISTTSettings +from pipecat.services.assemblyai.stt import AssemblyAISTTService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -49,7 +49,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = AssemblyAISTTService( api_key=os.getenv("ASSEMBLYAI_API_KEY"), - settings=AssemblyAISTTSettings( + settings=AssemblyAISTTService.Settings( model="u3-rt-pro", ), ) diff --git a/examples/foundational/13e-whisper-mlx.py b/examples/foundational/13e-whisper-mlx.py index 0f11d4397..211695a3a 100644 --- a/examples/foundational/13e-whisper-mlx.py +++ b/examples/foundational/13e-whisper-mlx.py @@ -18,7 +18,7 @@ from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.whisper.stt import MLXModel, WhisperMLXSTTSettings, WhisperSTTServiceMLX +from pipecat.services.whisper.stt import MLXModel, WhisperSTTServiceMLX from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -78,7 +78,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info(f"Starting bot") stt = WhisperSTTServiceMLX( - settings=WhisperMLXSTTSettings( + settings=WhisperSTTServiceMLX.Settings( model=MLXModel.LARGE_V3_TURBO, ), ) diff --git a/examples/foundational/13g-sambanova-transcription.py b/examples/foundational/13g-sambanova-transcription.py index 1e399c38f..404c215fd 100644 --- a/examples/foundational/13g-sambanova-transcription.py +++ b/examples/foundational/13g-sambanova-transcription.py @@ -19,7 +19,7 @@ from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.sambanova.stt import SambaNovaSTTService, SambaNovaSTTSettings +from pipecat.services.sambanova.stt import SambaNovaSTTService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -79,7 +79,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info(f"Starting bot") stt = SambaNovaSTTService( - settings=SambaNovaSTTSettings( + settings=SambaNovaSTTService.Settings( model="Whisper-Large-v3", ), api_key=os.getenv("SAMBANOVA_API_KEY"), diff --git a/examples/foundational/13h-speechmatics-transcription.py b/examples/foundational/13h-speechmatics-transcription.py index d013357f6..2df30f67b 100644 --- a/examples/foundational/13h-speechmatics-transcription.py +++ b/examples/foundational/13h-speechmatics-transcription.py @@ -16,7 +16,7 @@ from pipecat.pipeline.task import PipelineTask from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.speechmatics.stt import SpeechmaticsSTTService, SpeechmaticsSTTSettings +from pipecat.services.speechmatics.stt import SpeechmaticsSTTService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -65,7 +65,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = SpeechmaticsSTTService( api_key=os.getenv("SPEECHMATICS_API_KEY"), - settings=SpeechmaticsSTTSettings( + settings=SpeechmaticsSTTService.Settings( language=Language.EN, speaker_active_format="<{speaker_id}>{text}", ), diff --git a/examples/foundational/13l-gradium-transcription.py b/examples/foundational/13l-gradium-transcription.py index 84b23017c..59140466e 100644 --- a/examples/foundational/13l-gradium-transcription.py +++ b/examples/foundational/13l-gradium-transcription.py @@ -16,7 +16,7 @@ from pipecat.pipeline.task import PipelineTask from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.gradium.stt import GradiumSTTService, GradiumSTTSettings +from pipecat.services.gradium.stt import GradiumSTTService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -52,7 +52,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = GradiumSTTService( api_key=os.getenv("GRADIUM_API_KEY"), api_endpoint_base_url="wss://us.api.gradium.ai/api/speech/asr", - settings=GradiumSTTSettings( + settings=GradiumSTTService.Settings( language=Language.EN, delay_in_frames=8, ), diff --git a/examples/foundational/13m-openai-transcription.py b/examples/foundational/13m-openai-transcription.py index 8dc9e0101..fea5c2d97 100644 --- a/examples/foundational/13m-openai-transcription.py +++ b/examples/foundational/13m-openai-transcription.py @@ -18,7 +18,7 @@ from pipecat.pipeline.task import PipelineTask from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.openai.stt import OpenAIRealtimeSTTService, OpenAIRealtimeSTTSettings +from pipecat.services.openai.stt import OpenAIRealtimeSTTService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -53,7 +53,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = OpenAIRealtimeSTTService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAIRealtimeSTTSettings( + settings=OpenAIRealtimeSTTService.Settings( model="gpt-4o-transcribe", prompt="Expect words related to dogs, such as breed names.", ), diff --git a/examples/foundational/14-function-calling.py b/examples/foundational/14-function-calling.py index 81cddec90..7b7e11edf 100644 --- a/examples/foundational/14-function-calling.py +++ b/examples/foundational/14-function-calling.py @@ -23,10 +23,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -67,14 +67,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/14a-function-calling-anthropic.py b/examples/foundational/14a-function-calling-anthropic.py index efcaba47e..c0ad9102d 100644 --- a/examples/foundational/14a-function-calling-anthropic.py +++ b/examples/foundational/14a-function-calling-anthropic.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.anthropic.llm import AnthropicLLMService, AnthropicLLMSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.anthropic.llm import AnthropicLLMService +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -69,14 +69,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = AnthropicLLMService( api_key=os.getenv("ANTHROPIC_API_KEY"), - settings=AnthropicLLMSettings( + settings=AnthropicLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/14c-function-calling-together.py b/examples/foundational/14c-function-calling-together.py index 66ed02c15..3d2034cb4 100644 --- a/examples/foundational/14c-function-calling-together.py +++ b/examples/foundational/14c-function-calling-together.py @@ -24,10 +24,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.together.llm import TogetherLLMService, TogetherLLMSettings +from pipecat.services.together.llm import TogetherLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -64,14 +64,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = TogetherLLMService( api_key=os.getenv("TOGETHER_API_KEY"), - settings=TogetherLLMSettings( + settings=TogetherLLMService.Settings( model="meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), diff --git a/examples/foundational/14d-function-calling-anthropic-video.py b/examples/foundational/14d-function-calling-anthropic-video.py index 136a7f110..ce51ddb22 100644 --- a/examples/foundational/14d-function-calling-anthropic-video.py +++ b/examples/foundational/14d-function-calling-anthropic-video.py @@ -28,8 +28,8 @@ from pipecat.runner.utils import ( get_transport_client_id, maybe_capture_participant_camera, ) -from pipecat.services.anthropic.llm import AnthropicLLMService, AnthropicLLMSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.anthropic.llm import AnthropicLLMService +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -90,7 +90,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -98,7 +98,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Anthropic for vision analysis llm = AnthropicLLMService( api_key=os.getenv("ANTHROPIC_API_KEY"), - settings=AnthropicLLMSettings( + settings=AnthropicLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way. You are able to describe images from the user camera.", ), ) diff --git a/examples/foundational/14d-function-calling-aws-video.py b/examples/foundational/14d-function-calling-aws-video.py index 75235bc01..2c54e83f4 100644 --- a/examples/foundational/14d-function-calling-aws-video.py +++ b/examples/foundational/14d-function-calling-aws-video.py @@ -28,8 +28,8 @@ from pipecat.runner.utils import ( get_transport_client_id, maybe_capture_participant_camera, ) -from pipecat.services.aws.llm import AWSBedrockLLMService, AWSBedrockLLMSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.aws.llm import AWSBedrockLLMService +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -90,7 +90,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -98,7 +98,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # AWS for vision analysis llm = AWSBedrockLLMService( aws_region="us-west-2", - settings=AWSBedrockLLMSettings( + settings=AWSBedrockLLMService.Settings( model="us.anthropic.claude-sonnet-4-6", # Note: usually, prefer providing latency="optimized" param. # Here we can't because AWS Bedrock doesn't support it for Claude 3.7, diff --git a/examples/foundational/14d-function-calling-gemini-flash-video.py b/examples/foundational/14d-function-calling-gemini-flash-video.py index b261a8922..16d82e002 100644 --- a/examples/foundational/14d-function-calling-gemini-flash-video.py +++ b/examples/foundational/14d-function-calling-gemini-flash-video.py @@ -28,9 +28,9 @@ from pipecat.runner.utils import ( get_transport_client_id, maybe_capture_participant_camera, ) -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings +from pipecat.services.google.llm import GoogleLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -90,7 +90,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -98,7 +98,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Google Gemini model for vision analysis llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way. You are able to describe images from the user camera.", ), ) diff --git a/examples/foundational/14d-function-calling-moondream-video.py b/examples/foundational/14d-function-calling-moondream-video.py index 9de08ce05..df7fc6014 100644 --- a/examples/foundational/14d-function-calling-moondream-video.py +++ b/examples/foundational/14d-function-calling-moondream-video.py @@ -37,11 +37,11 @@ from pipecat.runner.utils import ( get_transport_client_id, maybe_capture_participant_camera, ) -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams from pipecat.services.moondream.vision import MoondreamService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -121,14 +121,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way. You are able to describe images from the user camera.", ), ) diff --git a/examples/foundational/14d-function-calling-openai-video.py b/examples/foundational/14d-function-calling-openai-video.py index 8c6416617..1eac522e8 100644 --- a/examples/foundational/14d-function-calling-openai-video.py +++ b/examples/foundational/14d-function-calling-openai-video.py @@ -29,10 +29,10 @@ from pipecat.runner.utils import ( get_transport_client_id, maybe_capture_participant_camera, ) -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -91,14 +91,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way. You are able to describe images from the user camera.", ), ) diff --git a/examples/foundational/14e-function-calling-google.py b/examples/foundational/14e-function-calling-google.py index 19a0392b9..e5a2cfb40 100644 --- a/examples/foundational/14e-function-calling-google.py +++ b/examples/foundational/14e-function-calling-google.py @@ -29,9 +29,9 @@ from pipecat.runner.utils import ( get_transport_client_id, maybe_capture_participant_camera, ) -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings +from pipecat.services.google.llm import GoogleLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -100,7 +100,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -126,7 +126,7 @@ indicate you should use the get_image tool are: llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( system_instruction=system_prompt, ), ) diff --git a/examples/foundational/14f-function-calling-groq.py b/examples/foundational/14f-function-calling-groq.py index 1b66e7e90..a6f383a1f 100644 --- a/examples/foundational/14f-function-calling-groq.py +++ b/examples/foundational/14f-function-calling-groq.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.groq.llm import GroqLLMService, GroqLLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.groq.llm import GroqLLMService from pipecat.services.groq.stt import GroqSTTService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -64,14 +64,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = GroqLLMService( api_key=os.getenv("GROQ_API_KEY"), - settings=GroqLLMSettings( + settings=GroqLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/14g-function-calling-grok.py b/examples/foundational/14g-function-calling-grok.py index eb607a5b8..283fd40fd 100644 --- a/examples/foundational/14g-function-calling-grok.py +++ b/examples/foundational/14g-function-calling-grok.py @@ -24,9 +24,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.grok.llm import GrokLLMService, GrokLLMSettings +from pipecat.services.grok.llm import GrokLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -64,14 +64,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = GrokLLMService( api_key=os.getenv("GROK_API_KEY"), - settings=GrokLLMSettings( + settings=GrokLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/14h-function-calling-azure.py b/examples/foundational/14h-function-calling-azure.py index 7eb3cb9de..3aae0c490 100644 --- a/examples/foundational/14h-function-calling-azure.py +++ b/examples/foundational/14h-function-calling-azure.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.azure.llm import AzureLLMService, AzureLLMSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.azure.llm import AzureLLMService +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -64,7 +64,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -72,7 +72,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = AzureLLMService( api_key=os.getenv("AZURE_CHATGPT_API_KEY"), endpoint=os.getenv("AZURE_CHATGPT_ENDPOINT"), - settings=AzureLLMSettings( + settings=AzureLLMService.Settings( model=os.getenv("AZURE_CHATGPT_MODEL"), system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), diff --git a/examples/foundational/14i-function-calling-fireworks.py b/examples/foundational/14i-function-calling-fireworks.py index 23d971324..c82165b17 100644 --- a/examples/foundational/14i-function-calling-fireworks.py +++ b/examples/foundational/14i-function-calling-fireworks.py @@ -24,9 +24,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.fireworks.llm import FireworksLLMService, FireworksLLMSettings +from pipecat.services.fireworks.llm import FireworksLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -64,14 +64,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = FireworksLLMService( api_key=os.getenv("FIREWORKS_API_KEY"), - settings=FireworksLLMSettings( + settings=FireworksLLMService.Settings( model="accounts/fireworks/models/gpt-oss-20b", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), diff --git a/examples/foundational/14j-function-calling-nvidia.py b/examples/foundational/14j-function-calling-nvidia.py index 87c6812e8..39b75b7ac 100644 --- a/examples/foundational/14j-function-calling-nvidia.py +++ b/examples/foundational/14j-function-calling-nvidia.py @@ -24,10 +24,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.nvidia.llm import NvidiaLLMService, NvidiaLLMSettings +from pipecat.services.nvidia.llm import NvidiaLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -64,14 +64,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = NvidiaLLMService( api_key=os.getenv("NVIDIA_API_KEY"), - settings=NvidiaLLMSettings( + settings=NvidiaLLMService.Settings( model="nvidia/llama-3.3-nemotron-super-49b-v1.5", # Recommended when turning thinking off temperature=0.0, diff --git a/examples/foundational/14k-function-calling-cerebras.py b/examples/foundational/14k-function-calling-cerebras.py index 4bbcf3f8e..51b9c9bf9 100644 --- a/examples/foundational/14k-function-calling-cerebras.py +++ b/examples/foundational/14k-function-calling-cerebras.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.cerebras.llm import CerebrasLLMService, CerebrasLLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.cerebras.llm import CerebrasLLMService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -64,14 +64,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = CerebrasLLMService( api_key=os.getenv("CEREBRAS_API_KEY"), - settings=CerebrasLLMSettings( + settings=CerebrasLLMService.Settings( system_instruction="""You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. You have one functions available: diff --git a/examples/foundational/14l-function-calling-deepseek.py b/examples/foundational/14l-function-calling-deepseek.py index 425a58ec6..4af091b7a 100644 --- a/examples/foundational/14l-function-calling-deepseek.py +++ b/examples/foundational/14l-function-calling-deepseek.py @@ -24,9 +24,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.deepseek.llm import DeepSeekLLMService, DeepSeekLLMSettings +from pipecat.services.deepseek.llm import DeepSeekLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -64,14 +64,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = DeepSeekLLMService( api_key=os.getenv("DEEPSEEK_API_KEY"), - settings=DeepSeekLLMSettings( + settings=DeepSeekLLMService.Settings( model="deepseek-chat", system_instruction="""You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. diff --git a/examples/foundational/14m-function-calling-openrouter.py b/examples/foundational/14m-function-calling-openrouter.py index fd39ef7af..e23865435 100644 --- a/examples/foundational/14m-function-calling-openrouter.py +++ b/examples/foundational/14m-function-calling-openrouter.py @@ -24,10 +24,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.azure.tts import AzureTTSService, AzureTTSSettings +from pipecat.services.azure.tts import AzureTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openrouter.llm import OpenRouterLLMService, OpenRouterLLMSettings +from pipecat.services.openrouter.llm import OpenRouterLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -65,7 +65,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = AzureTTSService( api_key=os.getenv("AZURE_SPEECH_API_KEY"), region=os.getenv("AZURE_SPEECH_REGION"), - settings=AzureTTSSettings( + settings=AzureTTSService.Settings( voice="en-US-JennyNeural", language="en-US", rate="1.1", @@ -75,7 +75,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenRouterLLMService( api_key=os.getenv("OPENROUTER_API_KEY"), - settings=OpenRouterLLMSettings( + settings=OpenRouterLLMService.Settings( model="openai/gpt-4o-2024-11-20", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), diff --git a/examples/foundational/14n-function-calling-perplexity.py b/examples/foundational/14n-function-calling-perplexity.py index 78d397656..2c1ba9e00 100644 --- a/examples/foundational/14n-function-calling-perplexity.py +++ b/examples/foundational/14n-function-calling-perplexity.py @@ -28,9 +28,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.perplexity.llm import PerplexityLLMService, PerplexityLLMSettings +from pipecat.services.perplexity.llm import PerplexityLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -62,14 +62,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = PerplexityLLMService( api_key=os.getenv("PERPLEXITY_API_KEY"), - settings=PerplexityLLMSettings( + settings=PerplexityLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way, but try to be brief.", ), ) diff --git a/examples/foundational/14o-function-calling-gemini-openai-format.py b/examples/foundational/14o-function-calling-gemini-openai-format.py index 82a77e4bb..416e602bf 100644 --- a/examples/foundational/14o-function-calling-gemini-openai-format.py +++ b/examples/foundational/14o-function-calling-gemini-openai-format.py @@ -25,8 +25,8 @@ from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.elevenlabs.tts import ElevenLabsTTSService, ElevenLabsTTSSettings -from pipecat.services.google.llm_openai import GoogleLLMOpenAIBetaService, OpenAILLMSettings +from pipecat.services.elevenlabs.tts import ElevenLabsTTSService +from pipecat.services.google.llm_openai import GoogleLLMOpenAIBetaService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -64,14 +64,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = ElevenLabsTTSService( api_key=os.getenv("ELEVENLABS_API_KEY", ""), - settings=ElevenLabsTTSSettings( + settings=ElevenLabsTTSService.Settings( voice=os.getenv("ELEVENLABS_VOICE_ID", ""), ), ) llm = GoogleLLMOpenAIBetaService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=OpenAILLMSettings( + settings=GoogleLLMOpenAIBetaService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/14p-function-calling-gemini-vertex-ai.py b/examples/foundational/14p-function-calling-gemini-vertex-ai.py index 026e41e59..1f33efacf 100644 --- a/examples/foundational/14p-function-calling-gemini-vertex-ai.py +++ b/examples/foundational/14p-function-calling-gemini-vertex-ai.py @@ -25,8 +25,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.elevenlabs.tts import ElevenLabsTTSService, ElevenLabsTTSSettings -from pipecat.services.google.llm_vertex import GoogleVertexLLMService, GoogleVertexLLMSettings +from pipecat.services.elevenlabs.tts import ElevenLabsTTSService +from pipecat.services.google.llm_vertex import GoogleVertexLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -64,7 +64,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = ElevenLabsTTSService( api_key=os.getenv("ELEVENLABS_API_KEY", ""), - settings=ElevenLabsTTSSettings( + settings=ElevenLabsTTSService.Settings( voice=os.getenv("ELEVENLABS_VOICE_ID", ""), ), ) @@ -73,7 +73,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): credentials=os.getenv("GOOGLE_VERTEX_TEST_CREDENTIALS"), project_id=os.getenv("GOOGLE_CLOUD_PROJECT_ID"), location=os.getenv("GOOGLE_CLOUD_LOCATION"), - settings=GoogleVertexLLMSettings( + settings=GoogleVertexLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/14q-function-calling-qwen.py b/examples/foundational/14q-function-calling-qwen.py index 9aa1c3b91..bf866a519 100644 --- a/examples/foundational/14q-function-calling-qwen.py +++ b/examples/foundational/14q-function-calling-qwen.py @@ -24,10 +24,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.qwen.llm import QwenLLMService, QwenLLMSettings +from pipecat.services.qwen.llm import QwenLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -64,7 +64,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -72,7 +72,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = QwenLLMService( api_key=os.getenv("QWEN_API_KEY"), model="qwen2.5-72b-instruct", - settings=QwenLLMSettings( + settings=QwenLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/14r-function-calling-aws.py b/examples/foundational/14r-function-calling-aws.py index 2414e06f0..29591c80a 100644 --- a/examples/foundational/14r-function-calling-aws.py +++ b/examples/foundational/14r-function-calling-aws.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.aws.llm import AWSBedrockLLMService, AWSBedrockLLMSettings +from pipecat.services.aws.llm import AWSBedrockLLMService from pipecat.services.aws.stt import AWSTranscribeSTTService -from pipecat.services.aws.tts import AWSPollyTTSService, AWSPollyTTSSettings +from pipecat.services.aws.tts import AWSPollyTTSService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -66,7 +66,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = AWSPollyTTSService( region="us-west-2", # only specific regions support generative TTS - settings=AWSPollyTTSSettings( + settings=AWSPollyTTSService.Settings( voice="Joanna", engine="generative", rate="1.1", @@ -75,7 +75,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = AWSBedrockLLMService( aws_region="us-west-2", - settings=AWSBedrockLLMSettings( + settings=AWSBedrockLLMService.Settings( model="us.anthropic.claude-sonnet-4-6", temperature=0.8, system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", diff --git a/examples/foundational/14s-function-calling-sambanova.py b/examples/foundational/14s-function-calling-sambanova.py index 46ae742f3..c329135f9 100644 --- a/examples/foundational/14s-function-calling-sambanova.py +++ b/examples/foundational/14s-function-calling-sambanova.py @@ -24,9 +24,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.sambanova.llm import SambaNovaLLMService, SambaNovaLLMSettings +from pipecat.services.sambanova.llm import SambaNovaLLMService from pipecat.services.sambanova.stt import SambaNovaSTTService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -67,14 +67,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = SambaNovaLLMService( api_key=os.getenv("SAMBANOVA_API_KEY"), - settings=SambaNovaLLMSettings( + settings=SambaNovaLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/14t-function-calling-direct.py b/examples/foundational/14t-function-calling-direct.py index 86a8d61b2..7b4485226 100644 --- a/examples/foundational/14t-function-calling-direct.py +++ b/examples/foundational/14t-function-calling-direct.py @@ -23,10 +23,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -80,14 +80,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/14u-function-calling-ollama.py b/examples/foundational/14u-function-calling-ollama.py index 761bab4a4..a0c1ec33a 100644 --- a/examples/foundational/14u-function-calling-ollama.py +++ b/examples/foundational/14u-function-calling-ollama.py @@ -24,10 +24,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.ollama.llm import OLLamaLLMService, OLLamaLLMSettings +from pipecat.services.ollama.llm import OLLamaLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -68,13 +68,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OLLamaLLMService( - settings=OLLamaLLMSettings( + settings=OLLamaLLMService.Settings( model="llama3.2", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), diff --git a/examples/foundational/14v-function-calling-openai.py b/examples/foundational/14v-function-calling-openai.py index 5e86632ec..639d9bd23 100644 --- a/examples/foundational/14v-function-calling-openai.py +++ b/examples/foundational/14v-function-calling-openai.py @@ -24,9 +24,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.openai.stt import OpenAISTTService, OpenAISTTSettings -from pipecat.services.openai.tts import OpenAITTSService, OpenAITTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.openai.stt import OpenAISTTService +from pipecat.services.openai.tts import OpenAITTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -65,7 +65,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = OpenAISTTService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAISTTSettings( + settings=OpenAISTTService.Settings( model="gpt-4o-transcribe", prompt="Expect words related weather, such as temperature and conditions. And restaurant names.", ), @@ -73,7 +73,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = OpenAITTSService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAITTSSettings( + settings=OpenAITTSService.Settings( voice="ballad", ), instructions="Please speak clearly and at a moderate pace.", @@ -82,7 +82,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # model choices: gpt-4o, gpt-4.1, etc. llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/14w-function-calling-mistral.py b/examples/foundational/14w-function-calling-mistral.py index ce535c3ef..421a63b74 100644 --- a/examples/foundational/14w-function-calling-mistral.py +++ b/examples/foundational/14w-function-calling-mistral.py @@ -23,10 +23,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.mistral.llm import MistralLLMService, MistralLLMSettings +from pipecat.services.mistral.llm import MistralLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -67,14 +67,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = MistralLLMService( api_key=os.getenv("MISTRAL_API_KEY"), - settings=MistralLLMSettings( + settings=MistralLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/14x-function-calling-openpipe.py b/examples/foundational/14x-function-calling-openpipe.py index 4f6898f5c..e82062c16 100644 --- a/examples/foundational/14x-function-calling-openpipe.py +++ b/examples/foundational/14x-function-calling-openpipe.py @@ -24,10 +24,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openpipe.llm import OpenPipeLLMService, OpenPipeLLMSettings +from pipecat.services.openpipe.llm import OpenPipeLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -68,7 +68,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -78,7 +78,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): api_key=os.getenv("OPENAI_API_KEY"), openpipe_api_key=os.getenv("OPENPIPE_API_KEY"), tags={"conversation_id": f"pipecat-{timestamp}"}, - settings=OpenPipeLLMSettings( + settings=OpenPipeLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/15-switch-voices.py b/examples/foundational/15-switch-voices.py index 40f2202de..39918918b 100644 --- a/examples/foundational/15-switch-voices.py +++ b/examples/foundational/15-switch-voices.py @@ -26,10 +26,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.filters.function_filter import FunctionFilter from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -43,21 +43,21 @@ class SwitchVoices(ParallelPipeline): news_lady = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="bf991597-6c13-47e4-8411-91ec2de5c466", # Newslady ), ) british_lady = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) barbershop_man = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="a0e99841-438c-4a64-b679-ae501e7d6091", # Barbershop Man ), ) @@ -120,7 +120,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities. Respond to what the user said in a creative and helpful way. Your output should not include non-alphanumeric characters. You can do the following voices: 'News Lady', 'British Lady' and 'Barbershop Man'.", ), ) diff --git a/examples/foundational/15a-switch-languages.py b/examples/foundational/15a-switch-languages.py index d1bfc2289..67d943a0a 100644 --- a/examples/foundational/15a-switch-languages.py +++ b/examples/foundational/15a-switch-languages.py @@ -26,10 +26,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.filters.function_filter import FunctionFilter from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.deepgram.stt import DeepgramSTTService, DeepgramSTTSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -43,14 +43,14 @@ class SwitchLanguage(ParallelPipeline): english_tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) spanish_tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="d4db5fb9-f44b-4bd1-85fa-192e0f0d75f9", # Spanish-speaking Lady ), ) @@ -102,7 +102,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = DeepgramSTTService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramSTTSettings( + settings=DeepgramSTTService.Settings( language="multi", ), ) @@ -111,7 +111,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities. Respond to what the user said in a creative and helpful way. Your output should not include non-alphanumeric characters. You can speak the following languages: 'English' and 'Spanish'.", ), ) diff --git a/examples/foundational/16-gpu-container-local-bot.py b/examples/foundational/16-gpu-container-local-bot.py index c1d267df3..2b680eee1 100644 --- a/examples/foundational/16-gpu-container-local-bot.py +++ b/examples/foundational/16-gpu-container-local-bot.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.deepgram.tts import DeepgramTTSService, DeepgramTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.deepgram.tts import DeepgramTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import ( DailyOutputTransportMessageFrame, @@ -60,7 +60,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = DeepgramTTSService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramTTSSettings( + settings=DeepgramTTSService.Settings( voice="aura-asteria-en", ), base_url="http://0.0.0.0:8080", @@ -70,7 +70,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # To use OpenAI # api_key=os.getenv("OPENAI_API_KEY"), # Or, to use a local vLLM (or similar) api server - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( model="meta-llama/Meta-Llama-3-8B-Instruct", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), diff --git a/examples/foundational/17-detect-user-idle.py b/examples/foundational/17-detect-user-idle.py index 90434c77b..a1ac00501 100644 --- a/examples/foundational/17-detect-user-idle.py +++ b/examples/foundational/17-detect-user-idle.py @@ -32,10 +32,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.frame_processor import FrameDirection from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -115,14 +115,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/19-openai-realtime.py b/examples/foundational/19-openai-realtime.py index d10fbc129..8eeea9e02 100644 --- a/examples/foundational/19-openai-realtime.py +++ b/examples/foundational/19-openai-realtime.py @@ -37,10 +37,7 @@ from pipecat.services.openai.realtime.events import ( SemanticTurnDetection, SessionProperties, ) -from pipecat.services.openai.realtime.llm import ( - OpenAIRealtimeLLMService, - OpenAIRealtimeLLMSettings, -) +from pipecat.services.openai.realtime.llm import OpenAIRealtimeLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -142,7 +139,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAIRealtimeLLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAIRealtimeLLMSettings( + settings=OpenAIRealtimeLLMService.Settings( system_instruction="""You are a helpful and friendly AI. Act like a human, but remember that you aren't a human and that you can't do human diff --git a/examples/foundational/19a-azure-realtime.py b/examples/foundational/19a-azure-realtime.py index 8d52a1c12..c98dc167a 100644 --- a/examples/foundational/19a-azure-realtime.py +++ b/examples/foundational/19a-azure-realtime.py @@ -30,7 +30,6 @@ from pipecat.services.openai.realtime.events import ( InputAudioTranscription, SessionProperties, ) -from pipecat.services.openai.realtime.llm import OpenAIRealtimeLLMSettings from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -115,7 +114,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = AzureRealtimeLLMService( api_key=os.getenv("AZURE_REALTIME_API_KEY"), base_url=os.getenv("AZURE_REALTIME_BASE_URL"), - settings=OpenAIRealtimeLLMSettings( + settings=AzureRealtimeLLMService.Settings( system_instruction="""You are a helpful and friendly AI. Act like a human, but remember that you aren't a human and that you can't do human diff --git a/examples/foundational/19b-openai-realtime-beta-text.py b/examples/foundational/19b-openai-realtime-beta-text.py index 7a4ad3469..9e425537f 100644 --- a/examples/foundational/19b-openai-realtime-beta-text.py +++ b/examples/foundational/19b-openai-realtime-beta-text.py @@ -21,7 +21,7 @@ from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.llm_service import FunctionCallParams from pipecat.services.openai_realtime_beta import ( InputAudioNoiseReduction, @@ -147,7 +147,7 @@ Remember, your responses should be short. Just one or two sentences, usually. Re tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/19b-openai-realtime-text.py b/examples/foundational/19b-openai-realtime-text.py index e03381642..deb50e805 100644 --- a/examples/foundational/19b-openai-realtime-text.py +++ b/examples/foundational/19b-openai-realtime-text.py @@ -22,7 +22,7 @@ from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.llm_service import FunctionCallParams from pipecat.services.openai.realtime.events import ( AudioConfiguration, @@ -157,7 +157,7 @@ Remember, your responses should be short. Just one or two sentences, usually. Re tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/19c-openai-realtime-live-video.py b/examples/foundational/19c-openai-realtime-live-video.py index 31088ff0f..3038a57bc 100644 --- a/examples/foundational/19c-openai-realtime-live-video.py +++ b/examples/foundational/19c-openai-realtime-live-video.py @@ -32,10 +32,7 @@ from pipecat.services.openai.realtime.events import ( SemanticTurnDetection, SessionProperties, ) -from pipecat.services.openai.realtime.llm import ( - OpenAIRealtimeLLMService, - OpenAIRealtimeLLMSettings, -) +from pipecat.services.openai.realtime.llm import OpenAIRealtimeLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -65,7 +62,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAIRealtimeLLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAIRealtimeLLMSettings( + settings=OpenAIRealtimeLLMService.Settings( system_instruction="""You are a helpful and friendly AI. Act like a human, but remember that you aren't a human and that you can't do human diff --git a/examples/foundational/20a-persistent-context-openai.py b/examples/foundational/20a-persistent-context-openai.py index 691893336..d487133f5 100644 --- a/examples/foundational/20a-persistent-context-openai.py +++ b/examples/foundational/20a-persistent-context-openai.py @@ -26,7 +26,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams from pipecat.services.openai.llm import OpenAILLMService @@ -175,7 +175,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/20b-persistent-context-openai-realtime.py b/examples/foundational/20b-persistent-context-openai-realtime.py index b85f8c319..2b9a8b6bf 100644 --- a/examples/foundational/20b-persistent-context-openai-realtime.py +++ b/examples/foundational/20b-persistent-context-openai-realtime.py @@ -33,10 +33,7 @@ from pipecat.services.openai.realtime.events import ( SessionProperties, TurnDetection, ) -from pipecat.services.openai.realtime.llm import ( - OpenAIRealtimeLLMService, - OpenAIRealtimeLLMSettings, -) +from pipecat.services.openai.realtime.llm import OpenAIRealtimeLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -178,7 +175,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAIRealtimeLLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAIRealtimeLLMSettings( + settings=OpenAIRealtimeLLMService.Settings( system_instruction="""Your knowledge cutoff is 2023-10. You are a helpful and friendly AI. Act like a human, but remember that you aren't a human and that you can't do human diff --git a/examples/foundational/20c-persistent-context-anthropic.py b/examples/foundational/20c-persistent-context-anthropic.py index 78ab3a7bc..e7a8335ba 100644 --- a/examples/foundational/20c-persistent-context-anthropic.py +++ b/examples/foundational/20c-persistent-context-anthropic.py @@ -26,8 +26,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.anthropic.llm import AnthropicLLMService, AnthropicLLMSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.anthropic.llm import AnthropicLLMService +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -174,14 +174,16 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = AnthropicLLMService( api_key=os.getenv("ANTHROPIC_API_KEY"), - settings=AnthropicLLMSettings(system_instruction=system_instruction), + settings=AnthropicLLMService.Settings( + system_instruction=system_instruction, + ), ) # you can either register a single function for all function calls, or specific functions diff --git a/examples/foundational/20d-persistent-context-gemini.py b/examples/foundational/20d-persistent-context-gemini.py index 082e5f07f..638728331 100644 --- a/examples/foundational/20d-persistent-context-gemini.py +++ b/examples/foundational/20d-persistent-context-gemini.py @@ -31,7 +31,7 @@ from pipecat.runner.utils import ( get_transport_client_id, maybe_capture_participant_camera, ) -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.google.llm import GoogleLLMService from pipecat.services.llm_service import FunctionCallParams @@ -247,7 +247,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/20e-persistent-context-aws-nova-sonic.py b/examples/foundational/20e-persistent-context-aws-nova-sonic.py index 16e00d4c2..9614328f2 100644 --- a/examples/foundational/20e-persistent-context-aws-nova-sonic.py +++ b/examples/foundational/20e-persistent-context-aws-nova-sonic.py @@ -24,7 +24,7 @@ from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.aws.nova_sonic.llm import AWSNovaSonicLLMService, AWSNovaSonicLLMSettings +from pipecat.services.aws.nova_sonic.llm import AWSNovaSonicLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -222,7 +222,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): secret_access_key=os.getenv("AWS_SECRET_ACCESS_KEY"), access_key_id=os.getenv("AWS_ACCESS_KEY_ID"), region=os.getenv("AWS_REGION"), # as of 2025-05-06, us-east-1 is the only supported region - settings=AWSNovaSonicLLMSettings( + settings=AWSNovaSonicLLMService.Settings( voice="tiffany", # matthew, tiffany, amy system_instruction=system_instruction, ), diff --git a/examples/foundational/21-tavus-transport.py b/examples/foundational/21-tavus-transport.py index 2da83463d..1ac54ff19 100644 --- a/examples/foundational/21-tavus-transport.py +++ b/examples/foundational/21-tavus-transport.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMContextAggregatorPair, LLMUserAggregatorParams, ) -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings +from pipecat.services.google.llm import GoogleLLMService from pipecat.transports.tavus.transport import TavusParams, TavusTransport load_dotenv(override=True) @@ -51,14 +51,14 @@ async def main(): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="a167e0f3-df7e-4d52-a9c3-f949145efdab", ), ) llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/21a-tavus-video-service.py b/examples/foundational/21a-tavus-video-service.py index 0b26961c2..f716d88d8 100644 --- a/examples/foundational/21a-tavus-video-service.py +++ b/examples/foundational/21a-tavus-video-service.py @@ -23,9 +23,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings +from pipecat.services.google.llm import GoogleLLMService from pipecat.services.tavus.video import TavusVideoService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -61,14 +61,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="a167e0f3-df7e-4d52-a9c3-f949145efdab", ), ) llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/22-filter-incomplete-turns.py b/examples/foundational/22-filter-incomplete-turns.py index 6d5af6be8..454e22722 100644 --- a/examples/foundational/22-filter-incomplete-turns.py +++ b/examples/foundational/22-filter-incomplete-turns.py @@ -35,9 +35,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -70,14 +70,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/23-bot-background-sound.py b/examples/foundational/23-bot-background-sound.py index 53544fdf6..6f6cf8eb7 100644 --- a/examples/foundational/23-bot-background-sound.py +++ b/examples/foundational/23-bot-background-sound.py @@ -24,9 +24,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -75,14 +75,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/24-user-mute-strategy.py b/examples/foundational/24-user-mute-strategy.py index fac86dae4..f7e29c171 100644 --- a/examples/foundational/24-user-mute-strategy.py +++ b/examples/foundational/24-user-mute-strategy.py @@ -26,9 +26,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.deepgram.tts import DeepgramTTSService, DeepgramTTSSettings +from pipecat.services.deepgram.tts import DeepgramTTSService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -73,14 +73,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = DeepgramTTSService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramTTSSettings( + settings=DeepgramTTSService.Settings( voice="aura-2-helena-en", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful assistant who can check the weather. Always check the weather when a location is mentioned. Respond concisely and naturally. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points.", ), ) diff --git a/examples/foundational/25-google-audio-in.py b/examples/foundational/25-google-audio-in.py index 1a8d203cd..572e0e213 100644 --- a/examples/foundational/25-google-audio-in.py +++ b/examples/foundational/25-google-audio-in.py @@ -32,8 +32,8 @@ from pipecat.processors.aggregators.llm_response_universal import LLMContextAggr from pipecat.processors.frame_processor import FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.google.llm import GoogleLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -290,14 +290,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) conversation_llm = GoogleLLMService( name="Conversation", - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( model="gemini-2.5-flash", system_instruction=conversation_system_message, ), @@ -309,7 +309,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): input_transcription_llm = GoogleLLMService( name="Transcription", - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( model="gemini-2.5-flash", system_instruction=transcriber_system_message, ), diff --git a/examples/foundational/26-gemini-live.py b/examples/foundational/26-gemini-live.py index 76287236c..e8ca05407 100644 --- a/examples/foundational/26-gemini-live.py +++ b/examples/foundational/26-gemini-live.py @@ -18,7 +18,7 @@ from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.audio.vad_processor import VADProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService, GeminiLiveLLMSettings +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -64,7 +64,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GeminiLiveLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GeminiLiveLLMSettings( + settings=GeminiLiveLLMService.Settings( system_instruction=system_instruction, voice="Puck", # Aoede, Charon, Fenrir, Kore, Puck ), diff --git a/examples/foundational/26a-gemini-live-transcription.py b/examples/foundational/26a-gemini-live-transcription.py index eda8dde8b..5d9adbc7f 100644 --- a/examples/foundational/26a-gemini-live-transcription.py +++ b/examples/foundational/26a-gemini-live-transcription.py @@ -56,9 +56,11 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GeminiLiveLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - voice_id="Aoede", # Puck, Charon, Kore, Fenrir, Aoede - # system_instruction="Talk like a pirate." - # inference_on_context_initialization=False, + settings=GeminiLiveLLMService.Settings( + voice="Aoede", # Puck, Charon, Kore, Fenrir, Aoede + # system_instruction="Talk like a pirate." + # inference_on_context_initialization=False, + ), ) context = LLMContext( diff --git a/examples/foundational/26b-gemini-live-function-calling.py b/examples/foundational/26b-gemini-live-function-calling.py index 850327924..75481c2cd 100644 --- a/examples/foundational/26b-gemini-live-function-calling.py +++ b/examples/foundational/26b-gemini-live-function-calling.py @@ -26,7 +26,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService, GeminiLiveLLMSettings +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -120,7 +120,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GeminiLiveLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GeminiLiveLLMSettings( + settings=GeminiLiveLLMService.Settings( system_instruction=system_instruction, ), tools=tools, diff --git a/examples/foundational/26c-gemini-live-video.py b/examples/foundational/26c-gemini-live-video.py index 5cde4d214..dc5044617 100644 --- a/examples/foundational/26c-gemini-live-video.py +++ b/examples/foundational/26c-gemini-live-video.py @@ -28,7 +28,7 @@ from pipecat.runner.utils import ( maybe_capture_participant_camera, maybe_capture_participant_screen, ) -from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService, GeminiLiveLLMSettings +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -53,7 +53,7 @@ transport_params = { async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GeminiLiveLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GeminiLiveLLMSettings( + settings=GeminiLiveLLMService.Settings( voice="Aoede", # Puck, Charon, Kore, Fenrir, Aoede # system_instruction="Talk like a pirate." ), diff --git a/examples/foundational/26d-gemini-live-text.py b/examples/foundational/26d-gemini-live-text.py index dcaf617ac..29a4fd112 100644 --- a/examples/foundational/26d-gemini-live-text.py +++ b/examples/foundational/26d-gemini-live-text.py @@ -23,13 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.google.gemini_live.llm import ( - GeminiLiveLLMService, - GeminiLiveLLMSettings, - GeminiModalities, - InputParams, -) +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService, GeminiModalities from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -75,7 +70,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # https://cloud.google.com/vertex-ai/generative-ai/docs/live-api/tools#native-audio). llm = GeminiLiveLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GeminiLiveLLMSettings( + settings=GeminiLiveLLMService.Settings( system_instruction=SYSTEM_INSTRUCTION, modalities=GeminiModalities.TEXT, ), diff --git a/examples/foundational/26e-gemini-live-google-search.py b/examples/foundational/26e-gemini-live-google-search.py index 07c3a517d..28ab77c2a 100644 --- a/examples/foundational/26e-gemini-live-google-search.py +++ b/examples/foundational/26e-gemini-live-google-search.py @@ -23,7 +23,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService, GeminiLiveLLMSettings +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -73,7 +73,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Initialize the Gemini Multimodal Live model llm = GeminiLiveLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GeminiLiveLLMSettings( + settings=GeminiLiveLLMService.Settings( voice="Puck", # Aoede, Charon, Fenrir, Kore, Puck system_instruction=system_instruction, ), diff --git a/examples/foundational/26f-gemini-live-files-api.py b/examples/foundational/26f-gemini-live-files-api.py index a35265e86..5abb50788 100644 --- a/examples/foundational/26f-gemini-live-files-api.py +++ b/examples/foundational/26f-gemini-live-files-api.py @@ -23,7 +23,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService, GeminiLiveLLMSettings +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -110,7 +110,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Initialize Gemini service with File API support llm = GeminiLiveLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GeminiLiveLLMSettings( + settings=GeminiLiveLLMService.Settings( system_instruction=system_instruction, voice="Charon", # Aoede, Charon, Fenrir, Kore, Puck ), diff --git a/examples/foundational/26g-gemini-live-groundingMetadata.py b/examples/foundational/26g-gemini-live-groundingMetadata.py index 1dede44f2..0285483e5 100644 --- a/examples/foundational/26g-gemini-live-groundingMetadata.py +++ b/examples/foundational/26g-gemini-live-groundingMetadata.py @@ -19,7 +19,7 @@ from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.google.frames import LLMSearchResponseFrame -from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService, GeminiLiveLLMSettings +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -107,7 +107,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GeminiLiveLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GeminiLiveLLMSettings( + settings=GeminiLiveLLMService.Settings( system_instruction=SYSTEM_INSTRUCTION, voice="Charon", # Aoede, Charon, Fenrir, Kore, Puck ), diff --git a/examples/foundational/26h-gemini-live-vertex-function-calling.py b/examples/foundational/26h-gemini-live-vertex-function-calling.py index ba27bbc9d..18e417f22 100644 --- a/examples/foundational/26h-gemini-live-vertex-function-calling.py +++ b/examples/foundational/26h-gemini-live-vertex-function-calling.py @@ -26,7 +26,6 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live.llm import GeminiLiveLLMSettings from pipecat.services.google.gemini_live.llm_vertex import GeminiLiveVertexLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -118,7 +117,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): credentials=os.getenv("GOOGLE_VERTEX_TEST_CREDENTIALS"), project_id=os.getenv("GOOGLE_CLOUD_PROJECT_ID"), location=os.getenv("GOOGLE_CLOUD_LOCATION"), - settings=GeminiLiveLLMSettings( + settings=GeminiLiveVertexLLMService.Settings( system_instruction=system_instruction, voice="Puck", # Aoede, Charon, Fenrir, Kore, Puck ), diff --git a/examples/foundational/26i-gemini-live-graceful-end.py b/examples/foundational/26i-gemini-live-graceful-end.py index cfc09e19d..5359f431c 100644 --- a/examples/foundational/26i-gemini-live-graceful-end.py +++ b/examples/foundational/26i-gemini-live-graceful-end.py @@ -26,7 +26,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.frame_processor import FrameDirection from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService, GeminiLiveLLMSettings +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -132,7 +132,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GeminiLiveLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GeminiLiveLLMSettings( + settings=GeminiLiveLLMService.Settings( system_instruction=system_instruction, ), tools=tools, diff --git a/examples/foundational/27-simli-layer.py b/examples/foundational/27-simli-layer.py index 3120a1280..c8a9ad663 100644 --- a/examples/foundational/27-simli-layer.py +++ b/examples/foundational/27-simli-layer.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.services.simli.video import SimliVideoService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -60,7 +60,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", ), ) @@ -72,7 +72,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( model="gpt-4o-mini", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), diff --git a/examples/foundational/28-user-assistant-turns.py b/examples/foundational/28-user-assistant-turns.py index 6ff7ca9ec..b439794b5 100644 --- a/examples/foundational/28-user-assistant-turns.py +++ b/examples/foundational/28-user-assistant-turns.py @@ -24,9 +24,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -122,14 +122,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative, helpful, and brief way.", ), ) diff --git a/examples/foundational/29-turn-tracking-observer.py b/examples/foundational/29-turn-tracking-observer.py index a73126936..f17dd0260 100644 --- a/examples/foundational/29-turn-tracking-observer.py +++ b/examples/foundational/29-turn-tracking-observer.py @@ -27,10 +27,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -73,14 +73,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/30-observer.py b/examples/foundational/30-observer.py index 28a76059d..227a8978b 100644 --- a/examples/foundational/30-observer.py +++ b/examples/foundational/30-observer.py @@ -34,9 +34,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.frame_processor import FrameDirection from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_input import BaseInputTransport from pipecat.transports.base_output import BaseOutputTransport from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -104,14 +104,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/32-gemini-grounding-metadata.py b/examples/foundational/32-gemini-grounding-metadata.py index 6c2b182f7..89afacfc3 100644 --- a/examples/foundational/32-gemini-grounding-metadata.py +++ b/examples/foundational/32-gemini-grounding-metadata.py @@ -25,9 +25,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings, LLMSearchResponseFrame +from pipecat.services.google.llm import GoogleLLMService, LLMSearchResponseFrame from pipecat.services.llm_service import LLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -99,7 +99,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -107,7 +107,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Initialize the Gemini Multimodal Live model llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( system_instruction=system_instruction, ), tools=tools, diff --git a/examples/foundational/33-gemini-rag.py b/examples/foundational/33-gemini-rag.py index cadb3fd92..4c107d35f 100644 --- a/examples/foundational/33-gemini-rag.py +++ b/examples/foundational/33-gemini-rag.py @@ -69,9 +69,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings +from pipecat.services.google.llm import GoogleLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -183,7 +183,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="f9836c6e-a0bd-460e-9d3c-f7299fa60f94", # Southern Lady ), ) @@ -198,7 +198,7 @@ Your response will be turned into speech so use only simple words and punctuatio llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( model=VOICE_MODEL, system_instruction=system_prompt, ), diff --git a/examples/foundational/34-audio-recording.py b/examples/foundational/34-audio-recording.py index 2bc413ec2..6ddfa6033 100644 --- a/examples/foundational/34-audio-recording.py +++ b/examples/foundational/34-audio-recording.py @@ -63,9 +63,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.audio.audio_buffer_processor import AudioBufferProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -112,14 +112,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful assistant demonstrating audio recording capabilities. Keep your responses brief and clear.", ), ) diff --git a/examples/foundational/35-pattern-pair-voice-switching.py b/examples/foundational/35-pattern-pair-voice-switching.py index 0c5c6256c..ed9bb3973 100644 --- a/examples/foundational/35-pattern-pair-voice-switching.py +++ b/examples/foundational/35-pattern-pair-voice-switching.py @@ -56,9 +56,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -129,7 +129,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Initialize TTS with narrator voice as default tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice=VOICE_IDS["narrator"], ), text_aggregator=pattern_aggregator, @@ -186,7 +186,7 @@ Remember: Use narrator voice for EVERYTHING except the actual quoted dialogue."" # Initialize LLM llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction=system_prompt, ), ) diff --git a/examples/foundational/36-user-email-gathering.py b/examples/foundational/36-user-email-gathering.py index 2f9c04fd8..7e8a69011 100644 --- a/examples/foundational/36-user-email-gathering.py +++ b/examples/foundational/36-user-email-gathering.py @@ -24,10 +24,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -67,7 +67,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # (see https://docs.cartesia.ai/build-with-sonic/formatting-text-for-sonic/spelling-out-input-text) tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -85,7 +85,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You need to gather a valid email or emails from the user. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. If the user provides one or more email addresses confirm them with the user. Enclose all emails with tags, for example a@a.com.", ), ) diff --git a/examples/foundational/37-mem0.py b/examples/foundational/37-mem0.py index 5e9dc351d..06883a43e 100644 --- a/examples/foundational/37-mem0.py +++ b/examples/foundational/37-mem0.py @@ -60,9 +60,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.elevenlabs.tts import ElevenLabsTTSService, ElevenLabsTTSSettings +from pipecat.services.elevenlabs.tts import ElevenLabsTTSService from pipecat.services.mem0.memory import Mem0MemoryService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -166,7 +166,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Initialize text-to-speech service tts = ElevenLabsTTSService( api_key=os.getenv("ELEVENLABS_API_KEY"), - settings=ElevenLabsTTSSettings( + settings=ElevenLabsTTSService.Settings( voice="pNInz6obpgDQGcFmaJgB", ), ) @@ -225,7 +225,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Initialize LLM service llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( model="gpt-4o-mini", system_instruction="""You are a personal assistant. You can remember things about the person you are talking to. Some Guidelines: diff --git a/examples/foundational/38-smart-turn-fal.py b/examples/foundational/38-smart-turn-fal.py index 6ecc444f9..b2de247d7 100644 --- a/examples/foundational/38-smart-turn-fal.py +++ b/examples/foundational/38-smart-turn-fal.py @@ -24,9 +24,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -61,14 +61,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/38a-smart-turn-local-coreml.py b/examples/foundational/38a-smart-turn-local-coreml.py index 32cd507b8..3073ba0dd 100644 --- a/examples/foundational/38a-smart-turn-local-coreml.py +++ b/examples/foundational/38a-smart-turn-local-coreml.py @@ -23,9 +23,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -76,14 +76,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/38b-smart-turn-local.py b/examples/foundational/38b-smart-turn-local.py index 30849a71d..de8b214ea 100644 --- a/examples/foundational/38b-smart-turn-local.py +++ b/examples/foundational/38b-smart-turn-local.py @@ -24,9 +24,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -58,14 +58,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/39-mcp-stdio.py b/examples/foundational/39-mcp-stdio.py index b6f111044..0b2cfaabe 100644 --- a/examples/foundational/39-mcp-stdio.py +++ b/examples/foundational/39-mcp-stdio.py @@ -35,8 +35,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.anthropic.llm import AnthropicLLMService, AnthropicLLMSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.anthropic.llm import AnthropicLLMService +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.mcp_service import MCPClient from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -137,7 +137,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -157,7 +157,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = AnthropicLLMService( api_key=os.getenv("ANTHROPIC_API_KEY"), - settings=AnthropicLLMSettings( + settings=AnthropicLLMService.Settings( system_instruction=system_prompt, ), ) diff --git a/examples/foundational/39a-mcp-streamable-http.py b/examples/foundational/39a-mcp-streamable-http.py index 38f52ff1c..b71938e43 100644 --- a/examples/foundational/39a-mcp-streamable-http.py +++ b/examples/foundational/39a-mcp-streamable-http.py @@ -23,7 +23,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.google.llm import GoogleLLMService from pipecat.services.mcp_service import MCPClient @@ -58,7 +58,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/39b-mcp-streamable-http-gemini-live.py b/examples/foundational/39b-mcp-streamable-http-gemini-live.py index 8a0ea57fd..19a5aa1b6 100644 --- a/examples/foundational/39b-mcp-streamable-http-gemini-live.py +++ b/examples/foundational/39b-mcp-streamable-http-gemini-live.py @@ -23,7 +23,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.services.mcp_service import MCPClient @@ -58,7 +58,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/examples/foundational/39c-multiple-mcp.py b/examples/foundational/39c-multiple-mcp.py index 4c7bc27d9..b1ef3cb00 100644 --- a/examples/foundational/39c-multiple-mcp.py +++ b/examples/foundational/39c-multiple-mcp.py @@ -37,8 +37,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.anthropic.llm import AnthropicLLMService, AnthropicLLMSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.anthropic.llm import AnthropicLLMService +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.mcp_service import MCPClient from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -120,7 +120,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -141,7 +141,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = AnthropicLLMService( api_key=os.getenv("ANTHROPIC_API_KEY"), - settings=AnthropicLLMSettings( + settings=AnthropicLLMService.Settings( system_instruction=system_prompt, ), ) diff --git a/examples/foundational/40-aws-nova-sonic.py b/examples/foundational/40-aws-nova-sonic.py index 327efaac5..79a3d168c 100644 --- a/examples/foundational/40-aws-nova-sonic.py +++ b/examples/foundational/40-aws-nova-sonic.py @@ -28,7 +28,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.aws.nova_sonic.llm import AWSNovaSonicLLMService, AWSNovaSonicLLMSettings +from pipecat.services.aws.nova_sonic.llm import AWSNovaSonicLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -130,7 +130,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # - ap-northeast-1 region=os.getenv("AWS_REGION"), session_token=os.getenv("AWS_SESSION_TOKEN"), - settings=AWSNovaSonicLLMSettings( + settings=AWSNovaSonicLLMService.Settings( voice="tiffany", system_instruction=system_instruction, ), diff --git a/examples/foundational/42-interruption-config.py b/examples/foundational/42-interruption-config.py index a74b5cc7b..d690f60f0 100644 --- a/examples/foundational/42-interruption-config.py +++ b/examples/foundational/42-interruption-config.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -59,14 +59,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/43-heygen-transport.py b/examples/foundational/43-heygen-transport.py index 23b87a5bb..07190da16 100644 --- a/examples/foundational/43-heygen-transport.py +++ b/examples/foundational/43-heygen-transport.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMContextAggregatorPair, LLMUserAggregatorParams, ) -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings +from pipecat.services.google.llm import GoogleLLMService from pipecat.services.heygen.api_liveavatar import LiveAvatarNewSessionRequest from pipecat.transports.heygen.transport import HeyGenParams, HeyGenTransport, ServiceType @@ -56,14 +56,14 @@ async def main(): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="00967b2f-88a6-4a31-8153-110a92134b9f", ), ) llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( system_instruction="You are a helpful assistant. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Be succinct and respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/43a-heygen-video-service.py b/examples/foundational/43a-heygen-video-service.py index 5edeb6bc3..580aa52fc 100644 --- a/examples/foundational/43a-heygen-video-service.py +++ b/examples/foundational/43a-heygen-video-service.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings +from pipecat.services.google.llm import GoogleLLMService from pipecat.services.heygen.api_liveavatar import LiveAvatarNewSessionRequest from pipecat.services.heygen.client import ServiceType from pipecat.services.heygen.video import HeyGenVideoService @@ -63,14 +63,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="00967b2f-88a6-4a31-8153-110a92134b9f", ), ) llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( system_instruction="You are a helpful assistant. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Be succinct and respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/44-voicemail-detection.py b/examples/foundational/44-voicemail-detection.py index ef7d73b38..df47bb945 100644 --- a/examples/foundational/44-voicemail-detection.py +++ b/examples/foundational/44-voicemail-detection.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,14 +56,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/45-before-and-after-events.py b/examples/foundational/45-before-and-after-events.py index e0e5604c6..3c583546f 100644 --- a/examples/foundational/45-before-and-after-events.py +++ b/examples/foundational/45-before-and-after-events.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -67,14 +67,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/47-sentry-metrics.py b/examples/foundational/47-sentry-metrics.py index a415fd975..9fe35d4c4 100644 --- a/examples/foundational/47-sentry-metrics.py +++ b/examples/foundational/47-sentry-metrics.py @@ -23,9 +23,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.metrics.sentry import SentryMetrics from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -66,7 +66,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), metrics=SentryMetrics(), @@ -75,7 +75,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), metrics=SentryMetrics(), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/48-service-switcher.py b/examples/foundational/48-service-switcher.py index 970e14839..e37925006 100644 --- a/examples/foundational/48-service-switcher.py +++ b/examples/foundational/48-service-switcher.py @@ -27,12 +27,12 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.cartesia.stt import CartesiaSTTService -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.deepgram.tts import DeepgramTTSService, DeepgramTTSSettings -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings +from pipecat.services.deepgram.tts import DeepgramTTSService +from pipecat.services.google.llm import GoogleLLMService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -102,13 +102,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts_cartesia = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) tts_deepgram = DeepgramTTSService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramTTSSettings( + settings=DeepgramTTSService.Settings( voice="aura-2-helena-en", ), ) @@ -120,11 +120,11 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm_openai = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings(system_instruction=system_prompt), + settings=OpenAILLMService.Settings(system_instruction=system_prompt), ) llm_google = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings(system_instruction=system_prompt), + settings=GoogleLLMService.Settings(system_instruction=system_prompt), ) llm_switcher = LLMSwitcher( llms=[llm_openai, llm_google], strategy_type=ServiceSwitcherStrategyManual diff --git a/examples/foundational/49a-thinking-anthropic.py b/examples/foundational/49a-thinking-anthropic.py index a222ad19f..8825ce7c5 100644 --- a/examples/foundational/49a-thinking-anthropic.py +++ b/examples/foundational/49a-thinking-anthropic.py @@ -22,12 +22,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.anthropic.llm import ( - AnthropicLLMService, - AnthropicLLMSettings, - AnthropicThinkingConfig, -) -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.anthropic.llm import AnthropicLLMService, AnthropicThinkingConfig +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -60,14 +56,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = AnthropicLLMService( api_key=os.getenv("ANTHROPIC_API_KEY"), - settings=AnthropicLLMSettings( + settings=AnthropicLLMService.Settings( thinking=AnthropicThinkingConfig( type="enabled", budget_tokens=2048, diff --git a/examples/foundational/49b-thinking-google.py b/examples/foundational/49b-thinking-google.py index 05ec76f4c..ed7a393b0 100644 --- a/examples/foundational/49b-thinking-google.py +++ b/examples/foundational/49b-thinking-google.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings, GoogleThinkingConfig +from pipecat.services.google.llm import GoogleLLMService, GoogleThinkingConfig from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -64,7 +64,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), # model="gemini-3-pro-preview", # A more powerful reasoning model, but slower - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( thinking=GoogleThinkingConfig( thinking_budget=-1, # Dynamic thinking include_thoughts=True, diff --git a/examples/foundational/49c-thinking-functions-anthropic.py b/examples/foundational/49c-thinking-functions-anthropic.py index 977b49800..bc9f334c8 100644 --- a/examples/foundational/49c-thinking-functions-anthropic.py +++ b/examples/foundational/49c-thinking-functions-anthropic.py @@ -23,12 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.anthropic.llm import ( - AnthropicLLMService, - AnthropicLLMSettings, - AnthropicThinkingConfig, -) -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.anthropic.llm import AnthropicLLMService, AnthropicThinkingConfig +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -81,14 +77,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = AnthropicLLMService( api_key=os.getenv("ANTHROPIC_API_KEY"), - settings=AnthropicLLMSettings( + settings=AnthropicLLMService.Settings( thinking=AnthropicThinkingConfig( type="enabled", budget_tokens=2048, diff --git a/examples/foundational/49d-thinking-functions-google.py b/examples/foundational/49d-thinking-functions-google.py index 81b01f744..e8ecefcdd 100644 --- a/examples/foundational/49d-thinking-functions-google.py +++ b/examples/foundational/49d-thinking-functions-google.py @@ -23,9 +23,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings, GoogleThinkingConfig +from pipecat.services.google.llm import GoogleLLMService, GoogleThinkingConfig from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -77,7 +77,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -85,7 +85,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), # model="gemini-3-pro-preview", # A more powerful reasoning model, but slower - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( thinking=GoogleThinkingConfig( thinking_budget=-1, # Dynamic thinking include_thoughts=True, diff --git a/examples/foundational/51-grok-realtime.py b/examples/foundational/51-grok-realtime.py index 87486a0de..81a2c28c4 100644 --- a/examples/foundational/51-grok-realtime.py +++ b/examples/foundational/51-grok-realtime.py @@ -199,7 +199,9 @@ Always be helpful and proactive in offering assistance.""", # Create the Grok Realtime LLM service llm = GrokRealtimeLLMService( api_key=os.getenv("GROK_API_KEY"), - session_properties=session_properties, + settings=GrokRealtimeLLMService.Settings( + session_properties=session_properties, + ), ) # Register function handlers diff --git a/examples/foundational/52-live-translation.py b/examples/foundational/52-live-translation.py index a90eb3ce4..7a4a4b112 100644 --- a/examples/foundational/52-live-translation.py +++ b/examples/foundational/52-live-translation.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -59,14 +59,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="d4db5fb9-f44b-4bd1-85fa-192e0f0d75f9", # Spanish-speaking Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a live translation assistant. Your sole purpose is to translate English text into Spanish. When you receive English text from the user, immediately translate it into natural, fluent Spanish. Do not add explanations, commentary, or extra information—only provide the Spanish translation of the text you receive.", ), ) diff --git a/examples/foundational/53-concurrent-llm-evaluation.py b/examples/foundational/53-concurrent-llm-evaluation.py index 0ae0afa18..46b2847e9 100644 --- a/examples/foundational/53-concurrent-llm-evaluation.py +++ b/examples/foundational/53-concurrent-llm-evaluation.py @@ -24,10 +24,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.audio.vad_processor import VADProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.groq.llm import GroqLLMService, GroqLLMSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.groq.llm import GroqLLMService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -62,21 +62,21 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) openai_llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) groq_llm = GroqLLMService( api_key=os.getenv("GROQ_API_KEY"), - settings=GroqLLMSettings( + settings=GroqLLMService.Settings( model="meta-llama/llama-4-maverick-17b-128e-instruct", system_instruction="You are a very helpful assistant. Your goal is to demonstrate your capabilities in detail in a creative and helpful way.", ), diff --git a/examples/foundational/53-concurrent-llm-rtvi-ignored-sources.py b/examples/foundational/53-concurrent-llm-rtvi-ignored-sources.py index d6b3feac3..d27bd86a1 100644 --- a/examples/foundational/53-concurrent-llm-rtvi-ignored-sources.py +++ b/examples/foundational/53-concurrent-llm-rtvi-ignored-sources.py @@ -31,9 +31,9 @@ from pipecat.processors.audio.vad_processor import VADProcessor from pipecat.processors.frameworks.rtvi import RTVIObserverParams from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -67,7 +67,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -75,7 +75,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Main LLM — drives the conversation. Its RTVI events reach the client. main_llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -85,7 +85,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): evaluator_llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), name="EvaluatorLLM", - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a silent quality evaluator. When given a user message, respond with a single JSON object: {'score': <1-5>, 'reason': ''}. Do not respond conversationally.", ), ) diff --git a/examples/foundational/54-context-summarization-openai.py b/examples/foundational/54-context-summarization-openai.py index 9c3f75fa5..0c0b72c17 100644 --- a/examples/foundational/54-context-summarization-openai.py +++ b/examples/foundational/54-context-summarization-openai.py @@ -34,10 +34,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -81,14 +81,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way. You have access to tools to get the current weather - use them when relevant.", ), ) diff --git a/examples/foundational/54a-context-summarization-google.py b/examples/foundational/54a-context-summarization-google.py index b9ce3d7c7..6c6315466 100644 --- a/examples/foundational/54a-context-summarization-google.py +++ b/examples/foundational/54a-context-summarization-google.py @@ -34,9 +34,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google import GoogleLLMService, GoogleLLMSettings +from pipecat.services.google import GoogleLLMService from pipecat.services.llm_service import FunctionCallParams from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -81,14 +81,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way. You have access to tools to get the current weather - use them when relevant.", ), ) diff --git a/examples/foundational/54b-context-summarization-manual-openai.py b/examples/foundational/54b-context-summarization-manual-openai.py index ae1e9bf14..520e1c996 100644 --- a/examples/foundational/54b-context-summarization-manual-openai.py +++ b/examples/foundational/54b-context-summarization-manual-openai.py @@ -34,15 +34,13 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams -from pipecat.turns.user_stop import TurnAnalyzerUserTurnStopStrategy -from pipecat.turns.user_turn_strategies import UserTurnStrategies load_dotenv(override=True) @@ -78,7 +76,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -94,7 +92,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction=system_prompt, ), ) diff --git a/examples/foundational/54c-context-summarization-dedicated-llm.py b/examples/foundational/54c-context-summarization-dedicated-llm.py index c3c4a0c2e..249368a68 100644 --- a/examples/foundational/54c-context-summarization-dedicated-llm.py +++ b/examples/foundational/54c-context-summarization-dedicated-llm.py @@ -36,11 +36,11 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings +from pipecat.services.google.llm import GoogleLLMService from pipecat.services.llm_service import FunctionCallParams -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -93,7 +93,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -110,7 +110,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Primary LLM for conversation (could be any provider) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction=system_prompt, ), ) @@ -118,7 +118,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Dedicated cheap/fast LLM for summarization only summarization_llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( model="gemini-2.5-flash", ), ) diff --git a/examples/foundational/55a-update-settings-deepgram-flux-stt.py b/examples/foundational/55a-update-settings-deepgram-flux-stt.py index 72d9b5638..fb0fbed72 100644 --- a/examples/foundational/55a-update-settings-deepgram-flux-stt.py +++ b/examples/foundational/55a-update-settings-deepgram-flux-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.deepgram.flux.stt import DeepgramFluxSTTService, DeepgramFluxSTTSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.deepgram.flux.stt import DeepgramFluxSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Deepgram Flux STT settings: language=es") await task.queue_frame( - STTUpdateSettingsFrame(delta=DeepgramFluxSTTSettings(language=Language.ES)) + STTUpdateSettingsFrame(delta=DeepgramFluxSTTService.Settings(language=Language.ES)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55a-update-settings-deepgram-sagemaker-stt.py b/examples/foundational/55a-update-settings-deepgram-sagemaker-stt.py index 30ce506a7..4b071d733 100644 --- a/examples/foundational/55a-update-settings-deepgram-sagemaker-stt.py +++ b/examples/foundational/55a-update-settings-deepgram-sagemaker-stt.py @@ -22,12 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.deepgram.sagemaker.stt import ( - DeepgramSageMakerSTTService, - DeepgramSageMakerSTTSettings, -) -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.deepgram.sagemaker.stt import DeepgramSageMakerSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -61,14 +58,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -111,7 +108,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Updating Deepgram SageMaker STT settings: language=es, punctuate=False") await task.queue_frame( STTUpdateSettingsFrame( - delta=DeepgramSageMakerSTTSettings( + delta=DeepgramSageMakerSTTService.Settings( language=Language.ES, punctuate=False, ) diff --git a/examples/foundational/55a-update-settings-deepgram-stt.py b/examples/foundational/55a-update-settings-deepgram-stt.py index 100887f80..3c39c8cd5 100644 --- a/examples/foundational/55a-update-settings-deepgram-stt.py +++ b/examples/foundational/55a-update-settings-deepgram-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.deepgram.stt import DeepgramSTTService, DeepgramSTTSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.deepgram.stt import DeepgramSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -105,7 +105,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Updating Deepgram STT settings: language=es, punctuate=False") await task.queue_frame( STTUpdateSettingsFrame( - delta=DeepgramSTTSettings( + delta=DeepgramSTTService.Settings( language=Language.ES, punctuate=False, ) diff --git a/examples/foundational/55b-update-settings-azure-stt.py b/examples/foundational/55b-update-settings-azure-stt.py index f93f907e7..59a411caf 100644 --- a/examples/foundational/55b-update-settings-azure-stt.py +++ b/examples/foundational/55b-update-settings-azure-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.azure.stt import AzureSTTService, AzureSTTSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.azure.stt import AzureSTTService +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -58,14 +58,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -105,7 +105,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Azure STT settings: language=es") - await task.queue_frame(STTUpdateSettingsFrame(delta=AzureSTTSettings(language=Language.ES))) + await task.queue_frame( + STTUpdateSettingsFrame(delta=AzureSTTService.Settings(language=Language.ES)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55c-update-settings-google-stt.py b/examples/foundational/55c-update-settings-google-stt.py index e2b844c2e..c6d44da12 100644 --- a/examples/foundational/55c-update-settings-google-stt.py +++ b/examples/foundational/55c-update-settings-google-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.google.stt import GoogleSTTService, GoogleSTTSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.google.stt import GoogleSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Google STT settings: language=es") await task.queue_frame( - STTUpdateSettingsFrame(delta=GoogleSTTSettings(language=Language.ES)) + STTUpdateSettingsFrame(delta=GoogleSTTService.Settings(language=Language.ES)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55d-update-settings-assemblyai-stt.py b/examples/foundational/55d-update-settings-assemblyai-stt.py index 2a49da3e2..f62a968eb 100644 --- a/examples/foundational/55d-update-settings-assemblyai-stt.py +++ b/examples/foundational/55d-update-settings-assemblyai-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.assemblyai.stt import AssemblyAISTTService, AssemblyAISTTSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.assemblyai.stt import AssemblyAISTTService +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -52,21 +52,21 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = AssemblyAISTTService( api_key=os.getenv("ASSEMBLYAI_API_KEY"), - settings=AssemblyAISTTSettings( + settings=AssemblyAISTTService.Settings( model="u3-rt-pro", ), ) tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call demonstrating dynamic keyterms updates. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Try saying difficult names like 'Xiomara', 'Saoirse', or 'Krzystof' to test transcription accuracy.", ), ) @@ -111,7 +111,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("🔄 Updating keyterms: Adding difficult names for boosting") await task.queue_frame( STTUpdateSettingsFrame( - delta=AssemblyAISTTSettings( + delta=AssemblyAISTTService.Settings( keyterms_prompt=["Xiomara", "Saoirse", "Krzystof", "Nguyen", "Pipecat"] ) ) diff --git a/examples/foundational/55e-update-settings-gladia-stt.py b/examples/foundational/55e-update-settings-gladia-stt.py index 885c78030..6ca8fa725 100644 --- a/examples/foundational/55e-update-settings-gladia-stt.py +++ b/examples/foundational/55e-update-settings-gladia-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.gladia.stt import GladiaSTTService, GladiaSTTSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.gladia.stt import GladiaSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Gladia STT settings: language=es") await task.queue_frame( - STTUpdateSettingsFrame(delta=GladiaSTTSettings(language=Language.ES)) + STTUpdateSettingsFrame(delta=GladiaSTTService.Settings(language=Language.ES)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55f-update-settings-elevenlabs-realtime-stt.py b/examples/foundational/55f-update-settings-elevenlabs-realtime-stt.py index 6598240cb..ee3244ffe 100644 --- a/examples/foundational/55f-update-settings-elevenlabs-realtime-stt.py +++ b/examples/foundational/55f-update-settings-elevenlabs-realtime-stt.py @@ -22,12 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.elevenlabs.stt import ( - ElevenLabsRealtimeSTTService, - ElevenLabsRealtimeSTTSettings, -) -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.elevenlabs.stt import ElevenLabsRealtimeSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -58,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -106,7 +103,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating ElevenLabs Realtime STT settings: language=es") await task.queue_frame( - STTUpdateSettingsFrame(delta=ElevenLabsRealtimeSTTSettings(language=Language.ES)) + STTUpdateSettingsFrame( + delta=ElevenLabsRealtimeSTTService.Settings(language=Language.ES) + ) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55g-update-settings-elevenlabs-stt.py b/examples/foundational/55g-update-settings-elevenlabs-stt.py index 50a160b2b..6307264fc 100644 --- a/examples/foundational/55g-update-settings-elevenlabs-stt.py +++ b/examples/foundational/55g-update-settings-elevenlabs-stt.py @@ -23,9 +23,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.elevenlabs.stt import ElevenLabsSTTService, ElevenLabsSTTSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.elevenlabs.stt import ElevenLabsSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -60,14 +60,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -110,7 +110,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating ElevenLabs STT settings: language=es") await task.queue_frame( - STTUpdateSettingsFrame(delta=ElevenLabsSTTSettings(language=Language.ES)) + STTUpdateSettingsFrame(delta=ElevenLabsSTTService.Settings(language=Language.ES)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55h-update-settings-speechmatics-stt.py b/examples/foundational/55h-update-settings-speechmatics-stt.py index 89b15c94c..df6d9575b 100644 --- a/examples/foundational/55h-update-settings-speechmatics-stt.py +++ b/examples/foundational/55h-update-settings-speechmatics-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.speechmatics.stt import SpeechmaticsSTTService, SpeechmaticsSTTSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.speechmatics.stt import SpeechmaticsSTTService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -53,7 +53,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = SpeechmaticsSTTService( api_key=os.getenv("SPEECHMATICS_API_KEY"), - settings=SpeechmaticsSTTSettings( + settings=SpeechmaticsSTTService.Settings( enable_diarization=True, speaker_active_format="<{speaker_id}>{text}", speaker_passive_format="<{speaker_id}>{text}", @@ -62,14 +62,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -110,13 +110,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Speechmatics STT settings: language=es") await task.queue_frame( - STTUpdateSettingsFrame(delta=SpeechmaticsSTTSettings(language=Language.ES)) + STTUpdateSettingsFrame(delta=SpeechmaticsSTTService.Settings(language=Language.ES)) ) await asyncio.sleep(10) logger.info("Updating Speechmatics STT settings: focus_speakers=['S1']") await task.queue_frame( - STTUpdateSettingsFrame(delta=SpeechmaticsSTTSettings(focus_speakers=["S1"])) + STTUpdateSettingsFrame(delta=SpeechmaticsSTTService.Settings(focus_speakers=["S1"])) ) await asyncio.sleep(10) @@ -125,7 +125,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) await task.queue_frame( STTUpdateSettingsFrame( - delta=SpeechmaticsSTTSettings( + delta=SpeechmaticsSTTService.Settings( speaker_active_format="{text}" ) ) diff --git a/examples/foundational/55i-update-settings-whisper-api-stt.py b/examples/foundational/55i-update-settings-whisper-api-stt.py index 72674d7dd..e9ef61cce 100644 --- a/examples/foundational/55i-update-settings-whisper-api-stt.py +++ b/examples/foundational/55i-update-settings-whisper-api-stt.py @@ -22,8 +22,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.services.openai.stt import OpenAISTTService from pipecat.services.whisper.base_stt import BaseWhisperSTTSettings from pipecat.transports.base_transport import BaseTransport, TransportParams @@ -61,14 +61,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) diff --git a/examples/foundational/55j-update-settings-sarvam-stt.py b/examples/foundational/55j-update-settings-sarvam-stt.py index b882c8a2b..529cf461d 100644 --- a/examples/foundational/55j-update-settings-sarvam-stt.py +++ b/examples/foundational/55j-update-settings-sarvam-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.sarvam.stt import SarvamSTTService, SarvamSTTSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.sarvam.stt import SarvamSTTService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Sarvam STT settings: language=en-IN") await task.queue_frame( - STTUpdateSettingsFrame(delta=SarvamSTTSettings(language=Language.EN_IN)) + STTUpdateSettingsFrame(delta=SarvamSTTService.Settings(language=Language.EN_IN)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55k-update-settings-soniox-stt.py b/examples/foundational/55k-update-settings-soniox-stt.py index bf395aefc..07e33b4cd 100644 --- a/examples/foundational/55k-update-settings-soniox-stt.py +++ b/examples/foundational/55k-update-settings-soniox-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.soniox.stt import SonioxSTTService, SonioxSTTSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.soniox.stt import SonioxSTTService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Soniox STT settings: language=es") await task.queue_frame( - STTUpdateSettingsFrame(delta=SonioxSTTSettings(language=Language.ES)) + STTUpdateSettingsFrame(delta=SonioxSTTService.Settings(language=Language.ES)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55l-update-settings-aws-transcribe-stt.py b/examples/foundational/55l-update-settings-aws-transcribe-stt.py index 9c37da430..e18833d8d 100644 --- a/examples/foundational/55l-update-settings-aws-transcribe-stt.py +++ b/examples/foundational/55l-update-settings-aws-transcribe-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.aws.stt import AWSTranscribeSTTService, AWSTranscribeSTTSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.aws.stt import AWSTranscribeSTTService +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating AWS Transcribe STT settings: language=es") await task.queue_frame( - STTUpdateSettingsFrame(delta=AWSTranscribeSTTSettings(language=Language.ES)) + STTUpdateSettingsFrame(delta=AWSTranscribeSTTService.Settings(language=Language.ES)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55m-update-settings-cartesia-stt.py b/examples/foundational/55m-update-settings-cartesia-stt.py index 97d18f6fe..0599c9b56 100644 --- a/examples/foundational/55m-update-settings-cartesia-stt.py +++ b/examples/foundational/55m-update-settings-cartesia-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.stt import CartesiaSTTService, CartesiaSTTSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.stt import CartesiaSTTService +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Cartesia STT settings: language=es") await task.queue_frame( - STTUpdateSettingsFrame(delta=CartesiaSTTSettings(language=Language.ES)) + STTUpdateSettingsFrame(delta=CartesiaSTTService.Settings(language=Language.ES)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55n-update-settings-cartesia-http-tts.py b/examples/foundational/55n-update-settings-cartesia-http-tts.py index 7ec4155da..af4e8d5c1 100644 --- a/examples/foundational/55n-update-settings-cartesia-http-tts.py +++ b/examples/foundational/55n-update-settings-cartesia-http-tts.py @@ -22,13 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import ( - CartesiaHttpTTSService, - CartesiaTTSSettings, - GenerationConfig, -) +from pipecat.services.cartesia.tts import CartesiaHttpTTSService, GenerationConfig from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -58,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaHttpTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaHttpTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -107,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Updating Cartesia HTTP TTS settings: speed increased to 1.5") await task.queue_frame( TTSUpdateSettingsFrame( - delta=CartesiaTTSSettings(generation_config=GenerationConfig(speed=1.5)) + delta=CartesiaHttpTTSService.Settings(generation_config=GenerationConfig(speed=1.5)) ) ) diff --git a/examples/foundational/55n-update-settings-cartesia-tts.py b/examples/foundational/55n-update-settings-cartesia-tts.py index 3ecf6ba5a..64afeffc2 100644 --- a/examples/foundational/55n-update-settings-cartesia-tts.py +++ b/examples/foundational/55n-update-settings-cartesia-tts.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings, GenerationConfig +from pipecat.services.cartesia.tts import CartesiaTTSService, GenerationConfig from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,14 +56,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -106,7 +106,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Updating Cartesia TTS settings: speed increased to 1.5") await task.queue_frame( TTSUpdateSettingsFrame( - delta=CartesiaTTSSettings(generation_config=GenerationConfig(speed=1.5)) + delta=CartesiaTTSService.Settings(generation_config=GenerationConfig(speed=1.5)) ) ) diff --git a/examples/foundational/55o-update-settings-elevenlabs-http-tts.py b/examples/foundational/55o-update-settings-elevenlabs-http-tts.py index 58ef44010..8b6479edf 100644 --- a/examples/foundational/55o-update-settings-elevenlabs-http-tts.py +++ b/examples/foundational/55o-update-settings-elevenlabs-http-tts.py @@ -25,8 +25,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.elevenlabs.tts import ElevenLabsHttpTTSService, ElevenLabsHttpTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.elevenlabs.tts import ElevenLabsHttpTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -58,13 +58,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = ElevenLabsHttpTTSService( api_key=os.getenv("ELEVENLABS_API_KEY"), - settings=ElevenLabsHttpTTSSettings(voice=os.getenv("ELEVENLABS_VOICE_ID")), + settings=ElevenLabsHttpTTSService.Settings(voice=os.getenv("ELEVENLABS_VOICE_ID")), aiohttp_session=session, ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -107,7 +107,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating ElevenLabs TTS settings: speed=0.7") await task.queue_frame( - TTSUpdateSettingsFrame(delta=ElevenLabsHttpTTSSettings(speed=0.7)) + TTSUpdateSettingsFrame(delta=ElevenLabsHttpTTSService.Settings(speed=0.7)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55o-update-settings-elevenlabs-tts.py b/examples/foundational/55o-update-settings-elevenlabs-tts.py index dcab84af4..03a692324 100644 --- a/examples/foundational/55o-update-settings-elevenlabs-tts.py +++ b/examples/foundational/55o-update-settings-elevenlabs-tts.py @@ -23,9 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.elevenlabs.tts import ElevenLabsTTSService, ElevenLabsTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.transcriptions.language import Language +from pipecat.services.elevenlabs.tts import ElevenLabsTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,12 +54,12 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = ElevenLabsTTSService( api_key=os.getenv("ELEVENLABS_API_KEY"), - settings=ElevenLabsTTSSettings(voice=os.getenv("ELEVENLABS_VOICE_ID")), + settings=ElevenLabsTTSService.Settings(voice=os.getenv("ELEVENLABS_VOICE_ID")), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -100,13 +99,15 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating ElevenLabs TTS settings: speed=0.7") - await task.queue_frame(TTSUpdateSettingsFrame(delta=ElevenLabsTTSSettings(speed=0.7))) + await task.queue_frame( + TTSUpdateSettingsFrame(delta=ElevenLabsTTSService.Settings(speed=0.7)) + ) await asyncio.sleep(10) logger.info("Updating ElevenLabs TTS settings: switching to a different voice") await task.queue_frame( TTSUpdateSettingsFrame( - delta=ElevenLabsTTSSettings(voice=os.getenv("ELEVENLABS_VOICE_ID_ALT")) + delta=ElevenLabsTTSService.Settings(voice=os.getenv("ELEVENLABS_VOICE_ID_ALT")) ) ) diff --git a/examples/foundational/55p-update-settings-openai-tts.py b/examples/foundational/55p-update-settings-openai-tts.py index 0a8c35cc2..110ee435b 100644 --- a/examples/foundational/55p-update-settings-openai-tts.py +++ b/examples/foundational/55p-update-settings-openai-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.openai.tts import OpenAITTSService, OpenAITTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.openai.tts import OpenAITTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -97,7 +97,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating OpenAI TTS settings: speed=2.0") - await task.queue_frame(TTSUpdateSettingsFrame(delta=OpenAITTSSettings(speed=2.0))) + await task.queue_frame(TTSUpdateSettingsFrame(delta=OpenAITTSService.Settings(speed=2.0))) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55q-update-settings-deepgram-http-tts.py b/examples/foundational/55q-update-settings-deepgram-http-tts.py index bed83dfc3..877ec3f65 100644 --- a/examples/foundational/55q-update-settings-deepgram-http-tts.py +++ b/examples/foundational/55q-update-settings-deepgram-http-tts.py @@ -25,8 +25,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.deepgram.tts import DeepgramHttpTTSService, DeepgramTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.deepgram.tts import DeepgramHttpTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -63,7 +63,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -106,13 +106,17 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating Deepgram TTS settings: voice="aura-2-aries-en"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=DeepgramTTSSettings(voice="aura-2-aries-en")) + TTSUpdateSettingsFrame( + delta=DeepgramHttpTTSService.Settings(voice="aura-2-aries-en") + ) ) await asyncio.sleep(10) logger.info('Updating Deepgram TTS settings: voice="aura-2-luna-en"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=DeepgramTTSSettings(voice="aura-2-luna-en")) + TTSUpdateSettingsFrame( + delta=DeepgramHttpTTSService.Settings(voice="aura-2-luna-en") + ) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55q-update-settings-deepgram-sagemaker-tts.py b/examples/foundational/55q-update-settings-deepgram-sagemaker-tts.py index 73a4ae365..270e00747 100644 --- a/examples/foundational/55q-update-settings-deepgram-sagemaker-tts.py +++ b/examples/foundational/55q-update-settings-deepgram-sagemaker-tts.py @@ -22,12 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.deepgram.sagemaker.tts import ( - DeepgramSageMakerTTSService, - DeepgramSageMakerTTSSettings, -) +from pipecat.services.deepgram.sagemaker.tts import DeepgramSageMakerTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -63,7 +60,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -104,13 +101,17 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating Deepgram SageMaker TTS settings: voice="aura-2-aries-en"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=DeepgramSageMakerTTSSettings(voice="aura-2-aries-en")) + TTSUpdateSettingsFrame( + delta=DeepgramSageMakerTTSService.Settings(voice="aura-2-aries-en") + ) ) await asyncio.sleep(10) logger.info('Updating Deepgram SageMaker TTS settings: voice="aura-2-luna-en"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=DeepgramSageMakerTTSSettings(voice="aura-2-luna-en")) + TTSUpdateSettingsFrame( + delta=DeepgramSageMakerTTSService.Settings(voice="aura-2-luna-en") + ) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55q-update-settings-deepgram-tts.py b/examples/foundational/55q-update-settings-deepgram-tts.py index f151f3d3f..335526768 100644 --- a/examples/foundational/55q-update-settings-deepgram-tts.py +++ b/examples/foundational/55q-update-settings-deepgram-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.deepgram.tts import DeepgramTTSService, DeepgramTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.deepgram.tts import DeepgramTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -97,13 +97,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating Deepgram TTS settings: voice="aura-2-aries-en"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=DeepgramTTSSettings(voice="aura-2-aries-en")) + TTSUpdateSettingsFrame(delta=DeepgramTTSService.Settings(voice="aura-2-aries-en")) ) await asyncio.sleep(10) logger.info('Updating Deepgram TTS settings: voice="aura-2-luna-en"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=DeepgramTTSSettings(voice="aura-2-luna-en")) + TTSUpdateSettingsFrame(delta=DeepgramTTSService.Settings(voice="aura-2-luna-en")) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55r-update-settings-azure-http-tts.py b/examples/foundational/55r-update-settings-azure-http-tts.py index 56d144718..56cb23854 100644 --- a/examples/foundational/55r-update-settings-azure-http-tts.py +++ b/examples/foundational/55r-update-settings-azure-http-tts.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.azure.tts import AzureHttpTTSService, AzureTTSSettings +from pipecat.services.azure.tts import AzureHttpTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -59,7 +59,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -100,7 +100,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating Azure TTS settings: rate="0.7", style="sad"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=AzureTTSSettings(rate="0.7", style="sad")) + TTSUpdateSettingsFrame(delta=AzureHttpTTSService.Settings(rate="0.7", style="sad")) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55r-update-settings-azure-tts.py b/examples/foundational/55r-update-settings-azure-tts.py index de234fec9..5ccaa99bc 100644 --- a/examples/foundational/55r-update-settings-azure-tts.py +++ b/examples/foundational/55r-update-settings-azure-tts.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.azure.tts import AzureTTSService, AzureTTSSettings +from pipecat.services.azure.tts import AzureTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -59,7 +59,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -100,7 +100,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating Azure TTS settings: rate="0.7", style="sad"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=AzureTTSSettings(rate="0.7", style="sad")) + TTSUpdateSettingsFrame(delta=AzureTTSService.Settings(rate="0.7", style="sad")) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55s-update-settings-google-http-tts.py b/examples/foundational/55s-update-settings-google-http-tts.py index 79d3a3d42..fbe44ff07 100644 --- a/examples/foundational/55s-update-settings-google-http-tts.py +++ b/examples/foundational/55s-update-settings-google-http-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.tts import GoogleHttpTTSService, GoogleHttpTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.google.tts import GoogleHttpTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -97,7 +97,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Google HTTP TTS settings: speaking_rate=1.4") await task.queue_frame( - TTSUpdateSettingsFrame(delta=GoogleHttpTTSSettings(speaking_rate=1.4)) + TTSUpdateSettingsFrame(delta=GoogleHttpTTSService.Settings(speaking_rate=1.4)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55s-update-settings-google-stream-tts.py b/examples/foundational/55s-update-settings-google-stream-tts.py index ca7e696af..b3310975a 100644 --- a/examples/foundational/55s-update-settings-google-stream-tts.py +++ b/examples/foundational/55s-update-settings-google-stream-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.tts import GoogleStreamTTSSettings, GoogleTTSService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.google.tts import GoogleTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -97,7 +97,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Google Stream TTS settings: speaking_rate=1.4") await task.queue_frame( - TTSUpdateSettingsFrame(delta=GoogleStreamTTSSettings(speaking_rate=1.4)) + TTSUpdateSettingsFrame(delta=GoogleTTSService.Settings(speaking_rate=1.4)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55u-update-settings-rime-http-tts.py b/examples/foundational/55u-update-settings-rime-http-tts.py index 6ecf61fce..07bb7e9a9 100644 --- a/examples/foundational/55u-update-settings-rime-http-tts.py +++ b/examples/foundational/55u-update-settings-rime-http-tts.py @@ -25,8 +25,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.rime.tts import RimeHttpTTSService, RimeTTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.rime.tts import RimeHttpTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -58,13 +58,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = RimeHttpTTSService( api_key=os.getenv("RIME_API_KEY"), - settings=RimeTTSSettings(voice="eva"), + settings=RimeHttpTTSService.Settings(voice="eva"), aiohttp_session=session, ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -106,7 +106,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Rime TTS settings: voice=rex") - await task.queue_frame(TTSUpdateSettingsFrame(delta=RimeTTSSettings(voice="rex"))) + await task.queue_frame( + TTSUpdateSettingsFrame(delta=RimeHttpTTSService.Settings(voice="rex")) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55u-update-settings-rime-tts.py b/examples/foundational/55u-update-settings-rime-tts.py index e8652d311..bbbdf534d 100644 --- a/examples/foundational/55u-update-settings-rime-tts.py +++ b/examples/foundational/55u-update-settings-rime-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.rime.tts import RimeTTSService, RimeTTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.rime.tts import RimeTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,12 +54,12 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = RimeTTSService( api_key=os.getenv("RIME_API_KEY"), - settings=RimeTTSSettings(voice="luna"), + settings=RimeTTSService.Settings(voice="luna"), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -99,7 +99,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Rime TTS settings: voice=bond") - await task.queue_frame(TTSUpdateSettingsFrame(delta=RimeTTSSettings(voice="bond"))) + await task.queue_frame(TTSUpdateSettingsFrame(delta=RimeTTSService.Settings(voice="bond"))) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55v-update-settings-lmnt-tts.py b/examples/foundational/55v-update-settings-lmnt-tts.py index 55ab18a16..30f8135a0 100644 --- a/examples/foundational/55v-update-settings-lmnt-tts.py +++ b/examples/foundational/55v-update-settings-lmnt-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.lmnt.tts import LmntTTSService, LmntTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.lmnt.tts import LmntTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,12 +54,12 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = LmntTTSService( api_key=os.getenv("LMNT_API_KEY"), - settings=LmntTTSSettings(voice="lily"), + settings=LmntTTSService.Settings(voice="lily"), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -99,7 +99,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating LMNT TTS settings: voice="tyler"') - await task.queue_frame(TTSUpdateSettingsFrame(delta=LmntTTSSettings(voice="tyler"))) + await task.queue_frame(TTSUpdateSettingsFrame(delta=LmntTTSService.Settings(voice="tyler"))) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55w-update-settings-fish-tts.py b/examples/foundational/55w-update-settings-fish-tts.py index 306f3e34d..f54d97684 100644 --- a/examples/foundational/55w-update-settings-fish-tts.py +++ b/examples/foundational/55w-update-settings-fish-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.fish.tts import FishAudioTTSService, FishAudioTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.fish.tts import FishAudioTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,12 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = FishAudioTTSService( api_key=os.getenv("FISH_API_KEY"), - settings=FishAudioTTSSettings(voice="4ce7e917cedd4bc2bb2e6ff3a46acaa1"), # Barack Obama + settings=FishAudioTTSService.Settings( + voice="4ce7e917cedd4bc2bb2e6ff3a46acaa1" + ), # Barack Obama ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -100,7 +102,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Fish Audio TTS settings: prosody_speed=1.5") await task.queue_frame( - TTSUpdateSettingsFrame(delta=FishAudioTTSSettings(prosody_speed=1.5)) + TTSUpdateSettingsFrame(delta=FishAudioTTSService.Settings(prosody_speed=1.5)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55x-update-settings-minimax-tts.py b/examples/foundational/55x-update-settings-minimax-tts.py index 44ae6339d..53a120811 100644 --- a/examples/foundational/55x-update-settings-minimax-tts.py +++ b/examples/foundational/55x-update-settings-minimax-tts.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.minimax.tts import MiniMaxHttpTTSService, MiniMaxTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.minimax.tts import MiniMaxHttpTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -62,7 +62,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -105,7 +105,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating MiniMax TTS settings: speed=1.5, emotion="happy"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=MiniMaxTTSSettings(speed=1.5, emotion="happy")) + TTSUpdateSettingsFrame( + delta=MiniMaxHttpTTSService.Settings(speed=1.5, emotion="happy") + ) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55y-update-settings-groq-tts.py b/examples/foundational/55y-update-settings-groq-tts.py index 161c73ef0..c58b672c8 100644 --- a/examples/foundational/55y-update-settings-groq-tts.py +++ b/examples/foundational/55y-update-settings-groq-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.groq.tts import GroqTTSService, GroqTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.groq.tts import GroqTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -96,7 +96,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Groq TTS settings: voice=troy") - await task.queue_frame(TTSUpdateSettingsFrame(delta=GroqTTSSettings(voice="troy"))) + await task.queue_frame(TTSUpdateSettingsFrame(delta=GroqTTSService.Settings(voice="troy"))) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55z-update-settings-hume-tts.py b/examples/foundational/55z-update-settings-hume-tts.py index ea8f3b316..3af8b5fe7 100644 --- a/examples/foundational/55z-update-settings-hume-tts.py +++ b/examples/foundational/55z-update-settings-hume-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.hume.tts import HumeTTSService, HumeTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.hume.tts import HumeTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,12 +54,12 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = HumeTTSService( api_key=os.getenv("HUME_API_KEY"), - settings=HumeTTSSettings(voice="f898a92e-685f-43fa-985b-a46920f0650b"), + settings=HumeTTSService.Settings(voice="f898a92e-685f-43fa-985b-a46920f0650b"), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -101,7 +101,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info('Updating Hume TTS settings: speed=2.0, description="Speak with excitement"') await task.queue_frame( TTSUpdateSettingsFrame( - delta=HumeTTSSettings(speed=2.0, description="Speak with excitement") + delta=HumeTTSService.Settings(speed=2.0, description="Speak with excitement") ) ) diff --git a/examples/foundational/55za-update-settings-neuphonic-http-tts.py b/examples/foundational/55za-update-settings-neuphonic-http-tts.py index 29de5281e..daaef4750 100644 --- a/examples/foundational/55za-update-settings-neuphonic-http-tts.py +++ b/examples/foundational/55za-update-settings-neuphonic-http-tts.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.neuphonic.tts import NeuphonicHttpTTSService, NeuphonicTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.neuphonic.tts import NeuphonicHttpTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -61,7 +61,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -103,7 +103,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Neuphonic HTTP TTS settings: speed=1.4") - await task.queue_frame(TTSUpdateSettingsFrame(delta=NeuphonicTTSSettings(speed=1.4))) + await task.queue_frame( + TTSUpdateSettingsFrame(delta=NeuphonicHttpTTSService.Settings(speed=1.4)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55za-update-settings-neuphonic-tts.py b/examples/foundational/55za-update-settings-neuphonic-tts.py index 58532eba0..dc9d3cb6f 100644 --- a/examples/foundational/55za-update-settings-neuphonic-tts.py +++ b/examples/foundational/55za-update-settings-neuphonic-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.neuphonic.tts import NeuphonicTTSService, NeuphonicTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.neuphonic.tts import NeuphonicTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -96,7 +96,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Neuphonic TTS settings: speed=1.4") - await task.queue_frame(TTSUpdateSettingsFrame(delta=NeuphonicTTSSettings(speed=1.4))) + await task.queue_frame( + TTSUpdateSettingsFrame(delta=NeuphonicTTSService.Settings(speed=1.4)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zb-update-settings-inworld-http-tts.py b/examples/foundational/55zb-update-settings-inworld-http-tts.py index dc11afac5..bb031c231 100644 --- a/examples/foundational/55zb-update-settings-inworld-http-tts.py +++ b/examples/foundational/55zb-update-settings-inworld-http-tts.py @@ -25,8 +25,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.inworld.tts import InworldHttpTTSService, InworldTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.inworld.tts import InworldHttpTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -60,7 +60,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -103,7 +103,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Inworld TTS settings: speaking_rate=1.5, temperature=0.8") await task.queue_frame( - TTSUpdateSettingsFrame(delta=InworldTTSSettings(speaking_rate=1.5, temperature=0.8)) + TTSUpdateSettingsFrame( + delta=InworldHttpTTSService.Settings(speaking_rate=1.5, temperature=0.8) + ) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zb-update-settings-inworld-tts.py b/examples/foundational/55zb-update-settings-inworld-tts.py index a1fb3a9f4..f1581bd44 100644 --- a/examples/foundational/55zb-update-settings-inworld-tts.py +++ b/examples/foundational/55zb-update-settings-inworld-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.inworld.tts import InworldTTSService, InworldTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.inworld.tts import InworldTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -97,7 +97,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Inworld TTS settings: speaking_rate=1.5, temperature=0.8") await task.queue_frame( - TTSUpdateSettingsFrame(delta=InworldTTSSettings(speaking_rate=1.5, temperature=0.8)) + TTSUpdateSettingsFrame( + delta=InworldTTSService.Settings(speaking_rate=1.5, temperature=0.8) + ) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zc-update-settings-gemini-tts.py b/examples/foundational/55zc-update-settings-gemini-tts.py index 41c7dfd8b..0bf027f20 100644 --- a/examples/foundational/55zc-update-settings-gemini-tts.py +++ b/examples/foundational/55zc-update-settings-gemini-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.tts import GeminiTTSService, GeminiTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.google.tts import GeminiTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,7 +55,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = GeminiTTSService( credentials=os.getenv("GOOGLE_TEST_CREDENTIALS"), - settings=GeminiTTSSettings( + settings=GeminiTTSService.Settings( model="gemini-2.5-flash-tts", voice="Charon", language=Language.EN_US, @@ -65,7 +65,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -106,7 +106,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating Gemini TTS settings: prompt="Speak slowly and dramatically"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=GeminiTTSSettings(prompt="Speak slowly and dramatically")) + TTSUpdateSettingsFrame( + delta=GeminiTTSService.Settings(prompt="Speak slowly and dramatically") + ) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zd-update-settings-aws-polly-tts.py b/examples/foundational/55zd-update-settings-aws-polly-tts.py index b1c632958..38a2544f2 100644 --- a/examples/foundational/55zd-update-settings-aws-polly-tts.py +++ b/examples/foundational/55zd-update-settings-aws-polly-tts.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.aws.tts import AWSPollyTTSService, AWSPollyTTSSettings +from pipecat.services.aws.tts import AWSPollyTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -96,7 +96,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating AWS Polly TTS settings: rate="fast"') - await task.queue_frame(TTSUpdateSettingsFrame(delta=AWSPollyTTSSettings(rate="fast"))) + await task.queue_frame( + TTSUpdateSettingsFrame(delta=AWSPollyTTSService.Settings(rate="fast")) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55ze-update-settings-sarvam-http-tts.py b/examples/foundational/55ze-update-settings-sarvam-http-tts.py index 1bbd0886e..e00dfc621 100644 --- a/examples/foundational/55ze-update-settings-sarvam-http-tts.py +++ b/examples/foundational/55ze-update-settings-sarvam-http-tts.py @@ -25,8 +25,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.sarvam.tts import SarvamHttpTTSService, SarvamHttpTTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.sarvam.tts import SarvamHttpTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -60,7 +60,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -102,7 +102,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Sarvam TTS settings: pace=1.5") - await task.queue_frame(TTSUpdateSettingsFrame(delta=SarvamHttpTTSSettings(pace=1.5))) + await task.queue_frame( + TTSUpdateSettingsFrame(delta=SarvamHttpTTSService.Settings(pace=1.5)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55ze-update-settings-sarvam-tts.py b/examples/foundational/55ze-update-settings-sarvam-tts.py index 52876c595..6b6a0709a 100644 --- a/examples/foundational/55ze-update-settings-sarvam-tts.py +++ b/examples/foundational/55ze-update-settings-sarvam-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.sarvam.tts import SarvamTTSService, SarvamTTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.sarvam.tts import SarvamTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -56,7 +56,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -96,7 +96,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Sarvam TTS settings: pace=1.5") - await task.queue_frame(TTSUpdateSettingsFrame(delta=SarvamTTSSettings(pace=1.5))) + await task.queue_frame(TTSUpdateSettingsFrame(delta=SarvamTTSService.Settings(pace=1.5))) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zf-update-settings-camb-tts.py b/examples/foundational/55zf-update-settings-camb-tts.py index 5c9987dc9..5f0840857 100644 --- a/examples/foundational/55zf-update-settings-camb-tts.py +++ b/examples/foundational/55zf-update-settings-camb-tts.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.camb.tts import CambTTSService, CambTTSSettings +from pipecat.services.camb.tts import CambTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -57,7 +57,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -97,7 +97,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Camb TTS settings: language -> Spanish") - await task.queue_frame(TTSUpdateSettingsFrame(delta=CambTTSSettings(language=Language.ES))) + await task.queue_frame( + TTSUpdateSettingsFrame(delta=CambTTSService.Settings(language=Language.ES)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zh-update-settings-resembleai-tts.py b/examples/foundational/55zh-update-settings-resembleai-tts.py index 192e5d868..befa0ce65 100644 --- a/examples/foundational/55zh-update-settings-resembleai-tts.py +++ b/examples/foundational/55zh-update-settings-resembleai-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.resembleai.tts import ResembleAITTSService, ResembleAITTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.resembleai.tts import ResembleAITTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,12 +54,12 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = ResembleAITTSService( api_key=os.getenv("RESEMBLE_API_KEY"), - settings=ResembleAITTSSettings(voice=os.getenv("RESEMBLE_VOICE_UUID")), + settings=ResembleAITTSService.Settings(voice=os.getenv("RESEMBLE_VOICE_UUID")), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -101,7 +101,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Updating ResembleAI TTS settings: voice (changed)") await task.queue_frame( TTSUpdateSettingsFrame( - delta=ResembleAITTSSettings(voice=os.getenv("RESEMBLE_VOICE_UUID_ALT")) + delta=ResembleAITTSService.Settings(voice=os.getenv("RESEMBLE_VOICE_UUID_ALT")) ) ) diff --git a/examples/foundational/55zi-update-settings-azure-llm.py b/examples/foundational/55zi-update-settings-azure-llm.py index 21f65eabb..5fbd796ca 100644 --- a/examples/foundational/55zi-update-settings-azure-llm.py +++ b/examples/foundational/55zi-update-settings-azure-llm.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.azure.llm import AzureLLMService, AzureLLMSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.azure.llm import AzureLLMService +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.base_llm import OpenAILLMSettings from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,7 +54,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -63,7 +62,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = AzureLLMService( api_key=os.getenv("AZURE_CHATGPT_API_KEY"), endpoint=os.getenv("AZURE_CHATGPT_ENDPOINT"), - settings=AzureLLMSettings( + settings=AzureLLMService.Settings( model=os.getenv("AZURE_CHATGPT_MODEL"), system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), @@ -104,7 +103,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Azure LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=AzureLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zi-update-settings-openai-llm.py b/examples/foundational/55zi-update-settings-openai-llm.py index 1eddc6bb4..76a14a3f0 100644 --- a/examples/foundational/55zi-update-settings-openai-llm.py +++ b/examples/foundational/55zi-update-settings-openai-llm.py @@ -22,9 +22,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.base_llm import OpenAILLMSettings from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -102,7 +101,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating OpenAI LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=OpenAILLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zj-update-settings-anthropic-llm.py b/examples/foundational/55zj-update-settings-anthropic-llm.py index c36ee758d..ba729bf4c 100644 --- a/examples/foundational/55zj-update-settings-anthropic-llm.py +++ b/examples/foundational/55zj-update-settings-anthropic-llm.py @@ -22,8 +22,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.anthropic.llm import AnthropicLLMService, AnthropicLLMSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.anthropic.llm import AnthropicLLMService +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -54,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = AnthropicLLMService( api_key=os.getenv("ANTHROPIC_API_KEY"), - settings=AnthropicLLMSettings( + settings=AnthropicLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -101,7 +101,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Anthropic LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=AnthropicLLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=AnthropicLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zk-update-settings-google-llm.py b/examples/foundational/55zk-update-settings-google-llm.py index 0eaa89d10..dc3e5917a 100644 --- a/examples/foundational/55zk-update-settings-google-llm.py +++ b/examples/foundational/55zk-update-settings-google-llm.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.google.llm import GoogleLLMService, GoogleLLMSettings +from pipecat.services.google.llm import GoogleLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = GoogleLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GoogleLLMSettings( + settings=GoogleLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -101,7 +101,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Google LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=GoogleLLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=GoogleLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zk-update-settings-google-vertex-llm.py b/examples/foundational/55zk-update-settings-google-vertex-llm.py index 95e84fec5..16cec654f 100644 --- a/examples/foundational/55zk-update-settings-google-vertex-llm.py +++ b/examples/foundational/55zk-update-settings-google-vertex-llm.py @@ -22,10 +22,10 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.google.llm import GoogleLLMSettings -from pipecat.services.google.llm_vertex import GoogleVertexLLMService, GoogleVertexLLMSettings +from pipecat.services.google.llm_vertex import GoogleVertexLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,7 +55,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -64,7 +64,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): credentials=os.getenv("GOOGLE_VERTEX_TEST_CREDENTIALS"), project_id=os.getenv("GOOGLE_CLOUD_PROJECT_ID"), location=os.getenv("GOOGLE_CLOUD_LOCATION"), - settings=GoogleVertexLLMSettings( + settings=GoogleVertexLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -104,7 +104,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Google Vertex LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=GoogleLLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=GoogleVertexLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zl-update-settings-azure-realtime.py b/examples/foundational/55zl-update-settings-azure-realtime.py index 247bde14b..fcfcdcfdd 100644 --- a/examples/foundational/55zl-update-settings-azure-realtime.py +++ b/examples/foundational/55zl-update-settings-azure-realtime.py @@ -24,7 +24,6 @@ from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.azure.realtime.llm import AzureRealtimeLLMService from pipecat.services.openai.realtime import events -from pipecat.services.openai.realtime.llm import OpenAIRealtimeLLMSettings from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -102,7 +101,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Updating Azure Realtime LLM settings: output_modalities=['text']") await task.queue_frame( LLMUpdateSettingsFrame( - delta=OpenAIRealtimeLLMSettings( + delta=AzureRealtimeLLMService.Settings( session_properties=events.SessionProperties(output_modalities=["text"]) ) ) @@ -112,7 +111,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Updating Azure Realtime LLM settings: output_modalities=['audio']") await task.queue_frame( LLMUpdateSettingsFrame( - delta=OpenAIRealtimeLLMSettings( + delta=AzureRealtimeLLMService.Settings( session_properties=events.SessionProperties(output_modalities=["audio"]) ) ) diff --git a/examples/foundational/55zl-update-settings-openai-realtime.py b/examples/foundational/55zl-update-settings-openai-realtime.py index f5c4afa26..372b1f1e6 100644 --- a/examples/foundational/55zl-update-settings-openai-realtime.py +++ b/examples/foundational/55zl-update-settings-openai-realtime.py @@ -23,10 +23,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.openai.realtime import events -from pipecat.services.openai.realtime.llm import ( - OpenAIRealtimeLLMService, - OpenAIRealtimeLLMSettings, -) +from pipecat.services.openai.realtime.llm import OpenAIRealtimeLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -101,7 +98,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Updating OpenAI Realtime LLM settings: output_modalities=['text']") await task.queue_frame( LLMUpdateSettingsFrame( - delta=OpenAIRealtimeLLMSettings( + delta=OpenAIRealtimeLLMService.Settings( session_properties=events.SessionProperties(output_modalities=["text"]) ) ) @@ -111,7 +108,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Updating OpenAI Realtime LLM settings: output_modalities=['audio']") await task.queue_frame( LLMUpdateSettingsFrame( - delta=OpenAIRealtimeLLMSettings( + delta=OpenAIRealtimeLLMService.Settings( session_properties=events.SessionProperties(output_modalities=["audio"]) ) ) diff --git a/examples/foundational/55zm-update-settings-gemini-live-vertex.py b/examples/foundational/55zm-update-settings-gemini-live-vertex.py index 715834f71..f69b94557 100644 --- a/examples/foundational/55zm-update-settings-gemini-live-vertex.py +++ b/examples/foundational/55zm-update-settings-gemini-live-vertex.py @@ -19,7 +19,6 @@ from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live.llm import GeminiLiveLLMSettings from pipecat.services.google.gemini_live.llm_vertex import GeminiLiveVertexLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -53,7 +52,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): credentials=os.getenv("GOOGLE_VERTEX_TEST_CREDENTIALS"), project_id=os.getenv("GOOGLE_CLOUD_PROJECT_ID"), location=os.getenv("GOOGLE_CLOUD_LOCATION"), - settings=GeminiLiveLLMSettings( + settings=GeminiLiveVertexLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -88,7 +87,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Gemini Live Vertex LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=GeminiLiveLLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=GeminiLiveVertexLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zm-update-settings-gemini-live.py b/examples/foundational/55zm-update-settings-gemini-live.py index 172daae7c..0b88c45da 100644 --- a/examples/foundational/55zm-update-settings-gemini-live.py +++ b/examples/foundational/55zm-update-settings-gemini-live.py @@ -19,7 +19,7 @@ from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService, GeminiLiveLLMSettings +from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -50,7 +50,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = GeminiLiveLLMService( api_key=os.getenv("GOOGLE_API_KEY"), - settings=GeminiLiveLLMSettings( + settings=GeminiLiveLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -85,7 +85,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Gemini Live LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=GeminiLiveLLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=GeminiLiveLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zn-update-settings-ultravox-realtime.py b/examples/foundational/55zn-update-settings-ultravox-realtime.py index 5bcbded6b..13ce6c1ae 100644 --- a/examples/foundational/55zn-update-settings-ultravox-realtime.py +++ b/examples/foundational/55zn-update-settings-ultravox-realtime.py @@ -24,11 +24,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.ultravox.llm import ( - OneShotInputParams, - UltravoxRealtimeLLMService, - UltravoxRealtimeLLMSettings, -) +from pipecat.services.ultravox.llm import OneShotInputParams, UltravoxRealtimeLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -112,13 +108,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Ultravox Realtime LLM settings: output_medium=text") await task.queue_frame( - LLMUpdateSettingsFrame(delta=UltravoxRealtimeLLMSettings(output_medium="text")) + LLMUpdateSettingsFrame(delta=UltravoxRealtimeLLMService.Settings(output_medium="text")) ) await asyncio.sleep(10) logger.info("Updating Ultravox Realtime LLM settings: output_medium=voice") await task.queue_frame( - LLMUpdateSettingsFrame(delta=UltravoxRealtimeLLMSettings(output_medium="voice")) + LLMUpdateSettingsFrame(delta=UltravoxRealtimeLLMService.Settings(output_medium="voice")) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zo-update-settings-grok-realtime.py b/examples/foundational/55zo-update-settings-grok-realtime.py index 9444f126a..5ac425de4 100644 --- a/examples/foundational/55zo-update-settings-grok-realtime.py +++ b/examples/foundational/55zo-update-settings-grok-realtime.py @@ -23,10 +23,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.grok.realtime import events -from pipecat.services.grok.realtime.llm import ( - GrokRealtimeLLMService, - GrokRealtimeLLMSettings, -) +from pipecat.services.grok.realtime.llm import GrokRealtimeLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -101,7 +98,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Updating Grok Realtime LLM settings: voice='Rex'") await task.queue_frame( LLMUpdateSettingsFrame( - delta=GrokRealtimeLLMSettings( + delta=GrokRealtimeLLMService.Settings( session_properties=events.SessionProperties(voice="Rex") ) ) diff --git a/examples/foundational/55zp-update-settings-aws-bedrock-llm.py b/examples/foundational/55zp-update-settings-aws-bedrock-llm.py index 06a131814..2452ceada 100644 --- a/examples/foundational/55zp-update-settings-aws-bedrock-llm.py +++ b/examples/foundational/55zp-update-settings-aws-bedrock-llm.py @@ -22,8 +22,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.aws.llm import AWSBedrockLLMService, AWSBedrockLLMSettings -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.aws.llm import AWSBedrockLLMService +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -54,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = AWSBedrockLLMService( aws_region="us-west-2", - settings=AWSBedrockLLMSettings( + settings=AWSBedrockLLMService.Settings( model="us.anthropic.claude-sonnet-4-6", temperature=0.8, system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", @@ -103,7 +103,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating AWS Bedrock LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=AWSBedrockLLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=AWSBedrockLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zq-update-settings-fal-stt.py b/examples/foundational/55zq-update-settings-fal-stt.py index 910b4d348..77d9bfd85 100644 --- a/examples/foundational/55zq-update-settings-fal-stt.py +++ b/examples/foundational/55zq-update-settings-fal-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.fal.stt import FalSTTService, FalSTTSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.fal.stt import FalSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -101,7 +101,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating Fal STT settings: task="translate"') - await task.queue_frame(STTUpdateSettingsFrame(delta=FalSTTSettings(task="translate"))) + await task.queue_frame( + STTUpdateSettingsFrame(delta=FalSTTService.Settings(task="translate")) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zr-update-settings-gradium-stt.py b/examples/foundational/55zr-update-settings-gradium-stt.py index 9e76d3bec..e621cc89b 100644 --- a/examples/foundational/55zr-update-settings-gradium-stt.py +++ b/examples/foundational/55zr-update-settings-gradium-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.gradium.stt import GradiumSTTService, GradiumSTTSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.gradium.stt import GradiumSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -57,14 +57,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -104,7 +104,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Gradium STT settings: delay_in_frames=5") - await task.queue_frame(STTUpdateSettingsFrame(delta=GradiumSTTSettings(delay_in_frames=16))) + await task.queue_frame( + STTUpdateSettingsFrame(delta=GradiumSTTService.Settings(delay_in_frames=16)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zt-update-settings-nvidia-segmented-stt.py b/examples/foundational/55zt-update-settings-nvidia-segmented-stt.py index abec5cb7a..62d10d455 100644 --- a/examples/foundational/55zt-update-settings-nvidia-segmented-stt.py +++ b/examples/foundational/55zt-update-settings-nvidia-segmented-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.nvidia.stt import NvidiaSegmentedSTTService, NvidiaSegmentedSTTSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.nvidia.stt import NvidiaSegmentedSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -102,7 +102,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating NVIDIA Segmented STT settings: profanity_filter=True") await task.queue_frame( - STTUpdateSettingsFrame(delta=NvidiaSegmentedSTTSettings(profanity_filter=True)) + STTUpdateSettingsFrame(delta=NvidiaSegmentedSTTService.Settings(profanity_filter=True)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zt-update-settings-nvidia-stt.py b/examples/foundational/55zt-update-settings-nvidia-stt.py index 116035aa2..612f12acf 100644 --- a/examples/foundational/55zt-update-settings-nvidia-stt.py +++ b/examples/foundational/55zt-update-settings-nvidia-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.nvidia.stt import NvidiaSTTService, NvidiaSTTSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.nvidia.stt import NvidiaSTTService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating NVIDIA STT settings: language=es") await task.queue_frame( - STTUpdateSettingsFrame(delta=NvidiaSTTSettings(language=Language.ES)) + STTUpdateSettingsFrame(delta=NvidiaSTTService.Settings(language=Language.ES)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zu-update-settings-openai-realtime-stt.py b/examples/foundational/55zu-update-settings-openai-realtime-stt.py index 846775cd4..62cf902ed 100644 --- a/examples/foundational/55zu-update-settings-openai-realtime-stt.py +++ b/examples/foundational/55zu-update-settings-openai-realtime-stt.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.openai.stt import OpenAIRealtimeSTTService, OpenAIRealtimeSTTSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.openai.stt import OpenAIRealtimeSTTService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating OpenAI Realtime STT settings: language=es") await task.queue_frame( - STTUpdateSettingsFrame(delta=OpenAIRealtimeSTTSettings(language=Language.ES)) + STTUpdateSettingsFrame(delta=OpenAIRealtimeSTTService.Settings(language=Language.ES)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zv-update-settings-asyncai-http-tts.py b/examples/foundational/55zv-update-settings-asyncai-http-tts.py index cea5ab72f..639a28d7f 100644 --- a/examples/foundational/55zv-update-settings-asyncai-http-tts.py +++ b/examples/foundational/55zv-update-settings-asyncai-http-tts.py @@ -24,9 +24,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.asyncai.tts import AsyncAIHttpTTSService, AsyncAITTSSettings +from pipecat.services.asyncai.tts import AsyncAIHttpTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -59,7 +59,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = AsyncAIHttpTTSService( api_key=os.getenv("ASYNCAI_API_KEY", ""), - settings=AsyncAITTSSettings( + settings=AsyncAIHttpTTSService.Settings( voice=os.getenv("ASYNCAI_VOICE_ID", "e0f39dc4-f691-4e78-bba5-5c636692cc04") ), aiohttp_session=session, @@ -67,7 +67,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -110,7 +110,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating AsyncAI HTTP TTS settings: language=es") await task.queue_frame( - TTSUpdateSettingsFrame(delta=AsyncAITTSSettings(language=Language.ES)) + TTSUpdateSettingsFrame(delta=AsyncAIHttpTTSService.Settings(language=Language.ES)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zv-update-settings-asyncai-tts.py b/examples/foundational/55zv-update-settings-asyncai-tts.py index 947b5c852..cac3fde19 100644 --- a/examples/foundational/55zv-update-settings-asyncai-tts.py +++ b/examples/foundational/55zv-update-settings-asyncai-tts.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.asyncai.tts import AsyncAITTSService, AsyncAITTSSettings +from pipecat.services.asyncai.tts import AsyncAITTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = AsyncAITTSService( api_key=os.getenv("ASYNCAI_API_KEY", ""), - settings=AsyncAITTSSettings( + settings=AsyncAITTSService.Settings( voice=os.getenv("ASYNCAI_VOICE_ID", "e0f39dc4-f691-4e78-bba5-5c636692cc04") ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -103,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating AsyncAI TTS settings: language=es") await task.queue_frame( - TTSUpdateSettingsFrame(delta=AsyncAITTSSettings(language=Language.ES)) + TTSUpdateSettingsFrame(delta=AsyncAITTSService.Settings(language=Language.ES)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zw-update-settings-gradium-tts.py b/examples/foundational/55zw-update-settings-gradium-tts.py index f81267d1c..d2b3535c4 100644 --- a/examples/foundational/55zw-update-settings-gradium-tts.py +++ b/examples/foundational/55zw-update-settings-gradium-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.gradium.tts import GradiumTTSService, GradiumTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.gradium.tts import GradiumTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -54,13 +54,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = GradiumTTSService( api_key=os.getenv("GRADIUM_API_KEY"), - settings=GradiumTTSSettings(voice="YTpq7expH9539ERJ"), + settings=GradiumTTSService.Settings(voice="YTpq7expH9539ERJ"), url="wss://us.api.gradium.ai/api/speech/tts", ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -101,7 +101,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating Gradium TTS settings: voice="LFZvm12tW_z0xfGo"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=GradiumTTSSettings(voice="LFZvm12tW_z0xfGo")) + TTSUpdateSettingsFrame(delta=GradiumTTSService.Settings(voice="LFZvm12tW_z0xfGo")) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zx-update-settings-cerebras-llm.py b/examples/foundational/55zx-update-settings-cerebras-llm.py index 3a9bf5510..2d8e5a3d9 100644 --- a/examples/foundational/55zx-update-settings-cerebras-llm.py +++ b/examples/foundational/55zx-update-settings-cerebras-llm.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.cerebras.llm import CerebrasLLMService, CerebrasLLMSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.cerebras.llm import CerebrasLLMService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.base_llm import OpenAILLMSettings from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = CerebrasLLMService( api_key=os.getenv("CEREBRAS_API_KEY"), - settings=CerebrasLLMSettings( + settings=CerebrasLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -102,7 +101,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Cerebras LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=CerebrasLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zy-update-settings-deepseek-llm.py b/examples/foundational/55zy-update-settings-deepseek-llm.py index 3a2dd38a8..2a439f76d 100644 --- a/examples/foundational/55zy-update-settings-deepseek-llm.py +++ b/examples/foundational/55zy-update-settings-deepseek-llm.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.deepseek.llm import DeepSeekLLMService, DeepSeekLLMSettings -from pipecat.services.openai.base_llm import OpenAILLMSettings +from pipecat.services.deepseek.llm import DeepSeekLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = DeepSeekLLMService( api_key=os.getenv("DEEPSEEK_API_KEY"), - settings=DeepSeekLLMSettings( + settings=DeepSeekLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -102,7 +101,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating DeepSeek LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=DeepSeekLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zz-update-settings-fireworks-llm.py b/examples/foundational/55zz-update-settings-fireworks-llm.py index fceaadbc2..0b184974d 100644 --- a/examples/foundational/55zz-update-settings-fireworks-llm.py +++ b/examples/foundational/55zz-update-settings-fireworks-llm.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.fireworks.llm import FireworksLLMService, FireworksLLMSettings -from pipecat.services.openai.base_llm import OpenAILLMSettings +from pipecat.services.fireworks.llm import FireworksLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = FireworksLLMService( api_key=os.getenv("FIREWORKS_API_KEY"), - settings=FireworksLLMSettings( + settings=FireworksLLMService.Settings( model="accounts/fireworks/models/gpt-oss-20b", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), @@ -103,7 +102,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Fireworks LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=FireworksLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zza-update-settings-grok-llm.py b/examples/foundational/55zza-update-settings-grok-llm.py index 6ea0cd3c3..c5caef791 100644 --- a/examples/foundational/55zza-update-settings-grok-llm.py +++ b/examples/foundational/55zza-update-settings-grok-llm.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.grok.llm import GrokLLMService, GrokLLMSettings -from pipecat.services.openai.base_llm import OpenAILLMSettings +from pipecat.services.grok.llm import GrokLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = GrokLLMService( api_key=os.getenv("GROK_API_KEY"), - settings=GrokLLMSettings( + settings=GrokLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -102,7 +101,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Grok LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=GrokLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zzb-update-settings-groq-llm.py b/examples/foundational/55zzb-update-settings-groq-llm.py index 9f655f7fc..25d1b4019 100644 --- a/examples/foundational/55zzb-update-settings-groq-llm.py +++ b/examples/foundational/55zzb-update-settings-groq-llm.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.groq.llm import GroqLLMService, GroqLLMSettings -from pipecat.services.openai.base_llm import OpenAILLMSettings +from pipecat.services.groq.llm import GroqLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = GroqLLMService( api_key=os.getenv("GROQ_API_KEY"), - settings=GroqLLMSettings( + settings=GroqLLMService.Settings( model="meta-llama/llama-4-maverick-17b-128e-instruct", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), @@ -103,7 +102,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Groq LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=GroqLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zzc-update-settings-mistral-llm.py b/examples/foundational/55zzc-update-settings-mistral-llm.py index a7cb56446..b3c5fa047 100644 --- a/examples/foundational/55zzc-update-settings-mistral-llm.py +++ b/examples/foundational/55zzc-update-settings-mistral-llm.py @@ -22,9 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.mistral.llm import MistralLLMService, MistralLLMSettings +from pipecat.services.mistral.llm import MistralLLMService from pipecat.services.openai.base_llm import OpenAILLMSettings from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,14 +55,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = MistralLLMService( api_key=os.getenv("MISTRAL_API_KEY"), - settings=MistralLLMSettings( + settings=MistralLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -102,7 +102,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Mistral LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=MistralLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zzd-update-settings-nvidia-llm.py b/examples/foundational/55zzd-update-settings-nvidia-llm.py index 13593b57b..eb099e50c 100644 --- a/examples/foundational/55zzd-update-settings-nvidia-llm.py +++ b/examples/foundational/55zzd-update-settings-nvidia-llm.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.nvidia.llm import NvidiaLLMService, NvidiaLLMSettings -from pipecat.services.openai.base_llm import OpenAILLMSettings +from pipecat.services.nvidia.llm import NvidiaLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = NvidiaLLMService( api_key=os.getenv("NVIDIA_API_KEY"), - settings=NvidiaLLMSettings( + settings=NvidiaLLMService.Settings( model="meta/llama-3.1-405b-instruct", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), @@ -103,7 +102,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating NVIDIA LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=NvidiaLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zze-update-settings-ollama-llm.py b/examples/foundational/55zze-update-settings-ollama-llm.py index a6904895b..5625e188c 100644 --- a/examples/foundational/55zze-update-settings-ollama-llm.py +++ b/examples/foundational/55zze-update-settings-ollama-llm.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.ollama.llm import OLLamaLLMService, OllamaLLMSettings -from pipecat.services.openai.base_llm import OpenAILLMSettings +from pipecat.services.ollama.llm import OLLamaLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,13 +54,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OLLamaLLMService( - settings=OllamaLLMSettings( + settings=OLLamaLLMService.Settings( model="llama3.2", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), @@ -102,7 +101,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating OLLama LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=OLLamaLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zzf-update-settings-openrouter-llm.py b/examples/foundational/55zzf-update-settings-openrouter-llm.py index 124e5f04a..4745ae537 100644 --- a/examples/foundational/55zzf-update-settings-openrouter-llm.py +++ b/examples/foundational/55zzf-update-settings-openrouter-llm.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.base_llm import OpenAILLMSettings -from pipecat.services.openrouter.llm import OpenRouterLLMService, OpenRouterLLMSettings +from pipecat.services.openrouter.llm import OpenRouterLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenRouterLLMService( api_key=os.getenv("OPENROUTER_API_KEY"), - settings=OpenRouterLLMSettings( + settings=OpenRouterLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -102,7 +101,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating OpenRouter LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=OpenRouterLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zzg-update-settings-perplexity-llm.py b/examples/foundational/55zzg-update-settings-perplexity-llm.py index 5227c6063..b764e0ff7 100644 --- a/examples/foundational/55zzg-update-settings-perplexity-llm.py +++ b/examples/foundational/55zzg-update-settings-perplexity-llm.py @@ -22,9 +22,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.base_llm import OpenAILLMSettings from pipecat.services.perplexity.llm import PerplexityLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -55,7 +54,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) @@ -103,7 +102,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Perplexity LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=PerplexityLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zzh-update-settings-qwen-llm.py b/examples/foundational/55zzh-update-settings-qwen-llm.py index 7a35fd124..2f56886b9 100644 --- a/examples/foundational/55zzh-update-settings-qwen-llm.py +++ b/examples/foundational/55zzh-update-settings-qwen-llm.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.base_llm import OpenAILLMSettings -from pipecat.services.qwen.llm import QwenLLMService, QwenLLMSettings +from pipecat.services.qwen.llm import QwenLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = QwenLLMService( api_key=os.getenv("QWEN_API_KEY"), - settings=QwenLLMSettings( + settings=QwenLLMService.Settings( model="qwen2.5-72b-instruct", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), @@ -103,7 +102,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Qwen LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=QwenLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zzi-update-settings-sambanova-llm.py b/examples/foundational/55zzi-update-settings-sambanova-llm.py index 73f3316db..46db2099f 100644 --- a/examples/foundational/55zzi-update-settings-sambanova-llm.py +++ b/examples/foundational/55zzi-update-settings-sambanova-llm.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.base_llm import OpenAILLMSettings -from pipecat.services.sambanova.llm import SambaNovaLLMService, SambaNovaLLMSettings +from pipecat.services.sambanova.llm import SambaNovaLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = SambaNovaLLMService( api_key=os.getenv("SAMBANOVA_API_KEY"), - settings=SambaNovaLLMSettings( + settings=SambaNovaLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -102,7 +101,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating SambaNova LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=SambaNovaLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zzj-update-settings-together-llm.py b/examples/foundational/55zzj-update-settings-together-llm.py index 314b81223..e293613b1 100644 --- a/examples/foundational/55zzj-update-settings-together-llm.py +++ b/examples/foundational/55zzj-update-settings-together-llm.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.base_llm import OpenAILLMSettings -from pipecat.services.together.llm import TogetherLLMService, TogetherLLMSettings +from pipecat.services.together.llm import TogetherLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -55,14 +54,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = TogetherLLMService( api_key=os.getenv("TOGETHER_API_KEY"), - settings=TogetherLLMSettings( + settings=TogetherLLMService.Settings( model="meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo", system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), @@ -103,7 +102,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating Together LLM settings: temperature=0.1") - await task.queue_frame(LLMUpdateSettingsFrame(delta=OpenAILLMSettings(temperature=0.1))) + await task.queue_frame( + LLMUpdateSettingsFrame(delta=TogetherLLMService.Settings(temperature=0.1)) + ) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/55zzk-update-settings-aws-nova-sonic-llm.py b/examples/foundational/55zzk-update-settings-aws-nova-sonic-llm.py index de516baa8..bec1c4d86 100644 --- a/examples/foundational/55zzk-update-settings-aws-nova-sonic-llm.py +++ b/examples/foundational/55zzk-update-settings-aws-nova-sonic-llm.py @@ -22,7 +22,7 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.aws.nova_sonic.llm import AWSNovaSonicLLMService, AWSNovaSonicLLMSettings +from pipecat.services.aws.nova_sonic.llm import AWSNovaSonicLLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -52,7 +52,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): secret_access_key=os.getenv("AWS_SECRET_ACCESS_KEY"), access_key_id=os.getenv("AWS_ACCESS_KEY_ID"), region=os.getenv("AWS_REGION"), - settings=AWSNovaSonicLLMSettings( + settings=AWSNovaSonicLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -91,7 +91,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info("Updating AWS Nova Sonic LLM settings: temperature=0.1") await task.queue_frame( - LLMUpdateSettingsFrame(delta=AWSNovaSonicLLMSettings(temperature=0.1)) + LLMUpdateSettingsFrame(delta=AWSNovaSonicLLMService.Settings(temperature=0.1)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zzl-update-settings-nvidia-tts.py b/examples/foundational/55zzl-update-settings-nvidia-tts.py index a6d26542a..5caaad3b4 100644 --- a/examples/foundational/55zzl-update-settings-nvidia-tts.py +++ b/examples/foundational/55zzl-update-settings-nvidia-tts.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.nvidia.tts import NvidiaTTSService, NvidiaTTSSettings -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings +from pipecat.services.nvidia.tts import NvidiaTTSService +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transcriptions.language import Language from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams @@ -57,7 +57,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -98,7 +98,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating NVIDIA TTS settings: language="ES_US"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=NvidiaTTSSettings(language=Language.ES_US)) + TTSUpdateSettingsFrame(delta=NvidiaTTSService.Settings(language=Language.ES_US)) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zzm-update-settings-speechmatics-tts.py b/examples/foundational/55zzm-update-settings-speechmatics-tts.py index 2cce46ebb..80a6c694c 100644 --- a/examples/foundational/55zzm-update-settings-speechmatics-tts.py +++ b/examples/foundational/55zzm-update-settings-speechmatics-tts.py @@ -24,8 +24,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.speechmatics.tts import SpeechmaticsTTSService, SpeechmaticsTTSSettings +from pipecat.services.openai.llm import OpenAILLMService +from pipecat.services.speechmatics.tts import SpeechmaticsTTSService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -61,7 +61,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -104,7 +104,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating Speechmatics TTS settings: voice="theo"') await task.queue_frame( - TTSUpdateSettingsFrame(delta=SpeechmaticsTTSSettings(voice="theo")) + TTSUpdateSettingsFrame(delta=SpeechmaticsTTSService.Settings(voice="theo")) ) @transport.event_handler("on_client_disconnected") diff --git a/examples/foundational/55zzn-update-settings-groq-stt.py b/examples/foundational/55zzn-update-settings-groq-stt.py index dc7ba6d23..1b4e9b8ed 100644 --- a/examples/foundational/55zzn-update-settings-groq-stt.py +++ b/examples/foundational/55zzn-update-settings-groq-stt.py @@ -22,10 +22,9 @@ from pipecat.processors.aggregators.llm_response_universal import ( ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings +from pipecat.services.cartesia.tts import CartesiaTTSService from pipecat.services.groq.stt import GroqSTTService -from pipecat.services.openai.llm import OpenAILLMService, OpenAILLMSettings -from pipecat.services.whisper.base_stt import BaseWhisperSTTSettings +from pipecat.services.openai.llm import OpenAILLMService from pipecat.transports.base_transport import BaseTransport, TransportParams from pipecat.transports.daily.transport import DailyParams from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams @@ -57,14 +56,14 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings( + settings=OpenAILLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) @@ -104,7 +103,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await asyncio.sleep(10) logger.info('Updating Groq STT settings: language="es"') - await task.queue_frame(STTUpdateSettingsFrame(delta=BaseWhisperSTTSettings(language="es"))) + await task.queue_frame(STTUpdateSettingsFrame(delta=GroqSTTService.Settings(language="es"))) @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): diff --git a/examples/foundational/56-lemonslice-transport.py b/examples/foundational/56-lemonslice-transport.py index aefa533e4..67f4e8ad1 100644 --- a/examples/foundational/56-lemonslice-transport.py +++ b/examples/foundational/56-lemonslice-transport.py @@ -23,8 +23,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMUserAggregatorParams, ) from pipecat.services.deepgram.stt import DeepgramSTTService -from pipecat.services.elevenlabs.tts import ElevenLabsTTSService, ElevenLabsTTSSettings -from pipecat.services.groq.llm import GroqLLMService, GroqLLMSettings +from pipecat.services.elevenlabs.tts import ElevenLabsTTSService +from pipecat.services.groq.llm import GroqLLMService from pipecat.transports.lemonslice.transport import ( LemonSliceNewSessionRequest, LemonSliceParams, @@ -57,14 +57,14 @@ async def main(): llm = GroqLLMService( api_key=os.getenv("GROQ_API_KEY"), - settings=GroqLLMSettings( + settings=GroqLLMService.Settings( system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.", ), ) tts = ElevenLabsTTSService( api_key=os.getenv("ELEVENLABS_API_KEY", ""), - settings=ElevenLabsTTSSettings( + settings=ElevenLabsTTSService.Settings( voice="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady ), ) diff --git a/scripts/evals/eval.py b/scripts/evals/eval.py index 992eb43c7..ab4edad8d 100644 --- a/scripts/evals/eval.py +++ b/scripts/evals/eval.py @@ -48,8 +48,8 @@ from pipecat.processors.aggregators.llm_response_universal import ( from pipecat.processors.audio.audio_buffer_processor import AudioBufferProcessor from pipecat.processors.frame_processor import FrameDirection from pipecat.runner.types import RunnerArguments -from pipecat.services.cartesia.tts import CartesiaTTSService, CartesiaTTSSettings -from pipecat.services.deepgram.stt import DeepgramSTTService, DeepgramSTTSettings +from pipecat.services.cartesia.tts import CartesiaTTSService +from pipecat.services.deepgram.stt import DeepgramSTTService from pipecat.services.llm_service import FunctionCallParams from pipecat.services.openai.base_llm import OpenAILLMSettings from pipecat.services.openai.llm import OpenAILLMService @@ -244,7 +244,7 @@ async def run_eval_pipeline( # 5" (in audio) this can be converted to "32 is 5". stt = DeepgramSTTService( api_key=os.getenv("DEEPGRAM_API_KEY"), - settings=DeepgramSTTSettings( + settings=DeepgramSTTService.Settings( language="multi", smart_format=False, ), @@ -252,7 +252,7 @@ async def run_eval_pipeline( tts = CartesiaTTSService( api_key=os.getenv("CARTESIA_API_KEY"), - settings=CartesiaTTSSettings( + settings=CartesiaTTSService.Settings( voice="97f4b8fb-f2fe-444b-bb9a-c109783a857a", # Nathan ), ) @@ -302,7 +302,9 @@ async def run_eval_pipeline( llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - settings=OpenAILLMSettings(system_instruction=system_prompt), + settings=OpenAILLMService.Settings( + system_instruction=system_prompt, + ), ) llm.register_function("eval_function", eval_runner.function_assert_eval) From f7dc13c0ded43eeca63ae32de1ef849e95be5fd6 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Mon, 9 Mar 2026 10:24:24 -0400 Subject: [PATCH 3/3] Update COMMUNITY_INTEGRATIONS.md for Settings alias class --- COMMUNITY_INTEGRATIONS.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/COMMUNITY_INTEGRATIONS.md b/COMMUNITY_INTEGRATIONS.md index e17c72bc7..f6f92a5d3 100644 --- a/COMMUNITY_INTEGRATIONS.md +++ b/COMMUNITY_INTEGRATIONS.md @@ -271,12 +271,15 @@ The rule of thumb: if a caller might send an update frame to change it at runtim #### Wiring settings into `__init__` -Accept an **optional** `settings` parameter. Build a `default_settings` object with all fields set to real values, then merge any caller overrides with `apply_update`: +Accept an **optional** `settings` parameter. Build a `default_settings` object with all fields set to real values, then merge any caller overrides with `apply_update`. + +Add a `Settings` **class attribute** that points to your settings dataclass. This lets callers access the settings class through the service itself (e.g. `MyTTSService.Settings(...)`) without a separate import: ```python from typing import Optional class MyTTSService(TTSService): + Settings = MyTTSSettings _settings: MyTTSSettings def __init__( @@ -311,10 +314,10 @@ This pattern lets callers override only what they care about: # Uses all defaults svc = MyTTSService(api_key="sk-xxx") -# Overrides just the voice +# Overrides just the voice — access Settings through the service class svc = MyTTSService( api_key="sk-xxx", - settings=MyTTSSettings(voice="custom-voice"), + settings=MyTTSService.Settings(voice="custom-voice"), ) ```