From ca5e668f4a730874bafcdba1d0a209904f28de8d Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Tue, 9 Dec 2025 10:14:27 -0500 Subject: [PATCH] Update `AWSNovaSonicLLMService` docstring with more (and more up-to-date) info --- examples/foundational/40-aws-nova-sonic.py | 2 +- src/pipecat/services/aws/nova_sonic/llm.py | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/examples/foundational/40-aws-nova-sonic.py b/examples/foundational/40-aws-nova-sonic.py index f53dd06f2..ed329e281 100644 --- a/examples/foundational/40-aws-nova-sonic.py +++ b/examples/foundational/40-aws-nova-sonic.py @@ -115,7 +115,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"), - voice_id="tiffany", # matthew, tiffany, amy + voice_id="tiffany", # you could choose to pass instruction here rather than via context # system_instruction=system_instruction # you could choose to pass tools here rather than via context diff --git a/src/pipecat/services/aws/nova_sonic/llm.py b/src/pipecat/services/aws/nova_sonic/llm.py index f581c351d..95477321b 100644 --- a/src/pipecat/services/aws/nova_sonic/llm.py +++ b/src/pipecat/services/aws/nova_sonic/llm.py @@ -193,7 +193,7 @@ class AWSNovaSonicLLMService(LLMService): session_token: Optional[str] = None, region: str, model: str = "amazon.nova-2-sonic-v1:0", - voice_id: str = "matthew", # matthew, tiffany, amy + voice_id: str = "matthew", params: Optional[Params] = None, system_instruction: Optional[str] = None, tools: Optional[ToolsSchema] = None, @@ -207,8 +207,15 @@ class AWSNovaSonicLLMService(LLMService): access_key_id: AWS access key ID for authentication. session_token: AWS session token for authentication. region: AWS region where the service is hosted. - model: Model identifier. Defaults to "amazon.nova-sonic-v1:0". - voice_id: Voice ID for speech synthesis. Options: matthew, tiffany, amy. + Supported regions: + - Nova 2 Sonic (the default model): "us-east-1", "us-west-2", "ap-northeast-1" + - Nova Sonic (the older model): "us-east-1", "ap-northeast-1" + model: Model identifier. Defaults to "amazon.nova-2-sonic-v1:0". + voice_id: Voice ID for speech synthesis. + Note that some voices are designed for use with a specific language. + Options: + - Nova 2 Sonic (the default model): see https://docs.aws.amazon.com/nova/latest/nova2-userguide/sonic-language-support.html + - Nova Sonic (the older model): see https://docs.aws.amazon.com/nova/latest/userguide/available-voices.html. params: Model parameters for audio configuration and inference. system_instruction: System-level instruction for the model. tools: Available tools/functions for the model to use.