Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/agents/voice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
STTModelSettings,
TTSModel,
TTSModelSettings,
TTSVoice,
VoiceModelProvider,
)
from .models.openai_model_provider import OpenAIVoiceModelProvider
Expand All @@ -30,6 +31,7 @@
"STTModelSettings",
"TTSModel",
"TTSModelSettings",
"TTSVoice",
"VoiceModelProvider",
"StreamedAudioResult",
"SingleAgentVoiceWorkflow",
Expand Down
7 changes: 3 additions & 4 deletions src/agents/voice/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
)
DEFAULT_TTS_BUFFER_SIZE = 120

TTSVoice = Literal["alloy", "ash", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer"]
"""Exportable type for the TTSModelSettings voice enum"""

@dataclass
class TTSModelSettings:
"""Settings for a TTS model."""

voice: (
Literal["alloy", "ash", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer"] | None
) = None
voice: TTSVoice | None = None
"""
The voice to use for the TTS model. If not provided, the default voice for the respective model
will be used.
Expand Down