From 9fd6c81c597785500a4a7676ea7cffed47cbf333 Mon Sep 17 00:00:00 2001 From: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com> Date: Thu, 20 Aug 2026 03:55:56 +0100 Subject: [PATCH] fix(voice): include current OpenAI TTS voices (#4535) --- src/agents/voice/model.py | 16 +++++++++++++++- tests/voice/test_tts_voice_types.py | 7 +++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tests/voice/test_tts_voice_types.py diff --git a/src/agents/voice/model.py b/src/agents/voice/model.py index ab1b5f75..5698fbee 100644 --- a/src/agents/voice/model.py +++ b/src/agents/voice/model.py @@ -14,7 +14,21 @@ DEFAULT_TTS_INSTRUCTIONS = ( ) DEFAULT_TTS_BUFFER_SIZE = 120 -TTSVoice = Literal["alloy", "ash", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer"] +TTSVoice = Literal[ + "alloy", + "ash", + "ballad", + "coral", + "echo", + "fable", + "onyx", + "nova", + "sage", + "shimmer", + "verse", + "marin", + "cedar", +] """Exportable type for the TTSModelSettings voice enum""" diff --git a/tests/voice/test_tts_voice_types.py b/tests/voice/test_tts_voice_types.py new file mode 100644 index 00000000..346f7313 --- /dev/null +++ b/tests/voice/test_tts_voice_types.py @@ -0,0 +1,7 @@ +from typing import get_args + +from agents.voice.model import TTSVoice + + +def test_tts_voice_type_includes_current_openai_builtin_voices() -> None: + assert {"ballad", "verse", "marin", "cedar"} <= set(get_args(TTSVoice))