Text to Speech
VoiceRun supports a wide variety of voices across multiple TTS providers including OpenAI, Azure, Google, Cartesia, and more.
Explore Available Voices#
Browse and preview all available voices in the Voice Library.
Voice Usage#
To use a voice in your agent, specify the voice name in a TextToSpeechEvent:
yield TextToSpeechEvent( text="Hello, this is a sample message!", voice="nova" )
Audio can be made uninterruptible by setting the interruptible flag to False:
yield TextToSpeechEvent( text="This message cannot be interrupted.", voice="nova", interruptible=False )
Using TextToSpeechIdentifier#
If you need to use a specific voice directly from a provider, you can use TextToSpeechIdentifier instead of a voice name string. This gives you direct access to any voice from a supported provider.
yield TextToSpeechEvent( text="Hello from Azure!", voice={"provider": "azure", "identifier": "en-AU-WilliamNeural"} )
Supported Providers#
| Provider | Example Identifier | Voice Reference |
|---|---|---|
azure | en-AU-WilliamNeural | Azure Voice Gallery |
cartesia | 6f84f4b8-58a2-430c-8c79-688dad597532 | Cartesia Voices |
custom | my_custom_voice | Custom Voices |
google_chirp | laomedeia | Google Chirp HD |
minimax | English_Aussie_Bloke | MiniMax Voices |
openai | nova | OpenAI TTS |
prim_voices | lyric | Voice Library |
qwen3 | Serena | Qwen TTS |
Examples#
# Azure Neural Voice yield TextToSpeechEvent( text="G'day mate!", voice={"provider": "azure", "identifier": "en-AU-WilliamNeural"} ) # Cartesia Voice (using voice ID) yield TextToSpeechEvent( text="Hello from Cartesia!", voice={"provider": "cartesia", "identifier": "6f84f4b8-58a2-430c-8c79-688dad597532"} ) # Google Chirp Voice yield TextToSpeechEvent( text="Hello from Google!", voice={"provider": "google_chirp", "identifier": "laomedeia"} ) # OpenAI Voice yield TextToSpeechEvent( text="Hello from OpenAI!", voice={"provider": "openai", "identifier": "nova"} ) # Custom Voice yield TextToSpeechEvent( text="Hello from my custom voice!", voice={"provider": "custom", "identifier": "my_voicerun_custom_voice"} )
Provider Features#
| Feature | OpenAI | Azure | Cartesia | |
|---|---|---|---|---|
| Streaming | Yes | Yes | No | Yes |
| Voice Instructions | Yes | No | No | No |
| Speed Control | Yes (0.25-4x) | Yes (0.5-3x) | No | No |
| Caching | Yes | Yes | Yes | Yes |
| Interruptible Control | Yes | Yes | Yes | Yes |
