diff --git a/examples/foundational/07g-interruptible-openai.py b/examples/foundational/07g-interruptible-openai.py index 476dd5cea..e73daa881 100644 --- a/examples/foundational/07g-interruptible-openai.py +++ b/examples/foundational/07g-interruptible-openai.py @@ -59,7 +59,7 @@ async def main(): prompt="Expect words related to dogs, such as breed names.", ) - tts = OpenAITTSService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4o-mini-tts-latest") + tts = OpenAITTSService(api_key=os.getenv("OPENAI_API_KEY"), voice="ballad") llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4o") diff --git a/src/pipecat/services/openai/tts.py b/src/pipecat/services/openai/tts.py index 6024310b8..238684504 100644 --- a/src/pipecat/services/openai/tts.py +++ b/src/pipecat/services/openai/tts.py @@ -19,14 +19,20 @@ from pipecat.frames.frames import ( ) from pipecat.services.tts_service import TTSService -ValidVoice = Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer"] +ValidVoice = Literal[ + "alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer" +] VALID_VOICES: Dict[str, ValidVoice] = { "alloy": "alloy", + "ash": "ash", + "ballad": "ballad", + "coral": "coral", "echo": "echo", "fable": "fable", "onyx": "onyx", "nova": "nova", + "sage": "sage", "shimmer": "shimmer", }