voice parameter controls which voice the AI uses when speaking to callers.
Configuring Voice
Set the voice in yourconfig.yaml file:
Available Voices
OpenAI Realtime API provides six distinct voices, each with unique characteristics:alloy
Neutral, balanced voiceBest for:
- General-purpose applications
- Professional business calls
- When you want a neutral, non-gendered sound
echo
Warm, conversational voiceBest for:
- Friendly customer service
- Casual conversations
- Building rapport with callers
fable
Expressive, storytelling voiceBest for:
- Entertainment applications
- Narrative-driven interactions
- Creative or playful scenarios
onyx
Deep, authoritative voiceBest for:
- Professional announcements
- Serious or formal contexts
- When authority is important
nova
Friendly, upbeat voiceBest for:
- Customer support
- Positive, encouraging interactions
- Energetic applications
shimmer
Soft, gentle voiceBest for:
- Calming applications
- Healthcare or wellness scenarios
- When a soothing tone is desired
Voice Comparison
Here’s a quick reference table to help you choose:| Voice | Tone | Best For | Gender Perception |
|---|---|---|---|
| alloy | Neutral, balanced | General purpose, professional | Neutral |
| echo | Warm, conversational | Customer service, friendly | Masculine |
| fable | Expressive, dynamic | Storytelling, creative | Neutral |
| onyx | Deep, authoritative | Formal, professional | Masculine |
| nova | Friendly, upbeat | Positive interactions | Feminine |
| shimmer | Soft, gentle | Calming, wellness | Feminine |
Testing Voices
To test different voices without editing your config file:- Make a test call:
- Edit
config.yamlto try a different voice:
- Restart the server:
- Make another call to hear the difference
Voice changes require a server restart to take effect.
Dynamic Voice Selection
While the default voice is set inconfig.yaml, you can modify the voice programmatically if needed.
Example: Per-Call Voice Selection
If you want different voices for different types of calls, you can modify the voice in your code:config.py:90-97 for the OpenAIRealtimeConfig structure.
Voice and Language
All OpenAI Realtime voices support multiple languages with natural accents:- English (US, UK, Australian, etc.)
- Spanish
- French
- German
- Italian
- Portuguese
- And many more
Language detection and switching happen automatically based on the conversation context.
Configuration Best Practices
For Customer Service
- Recommended:
novaorecho - Friendly, approachable tone puts callers at ease
- Clear pronunciation ensures understanding
For Professional Business
- Recommended:
alloyoronyx - Neutral, authoritative tone conveys competence
- Appropriate for formal contexts
For Healthcare/Wellness
- Recommended:
shimmerornova - Calming, reassuring tone reduces anxiety
- Gentle delivery for sensitive topics
For Entertainment/Creative
- Recommended:
fableornova - Expressive delivery engages listeners
- Dynamic intonation maintains interest
Advanced: Voice Parameters
The OpenAI Realtime API uses the voice parameter as specified. Currently, there are no additional voice customization options like:- Pitch adjustment
- Speed control
- Volume settings
The AI automatically adjusts pacing and tone based on conversation context, regardless of the selected voice.
Gemini Voice (Legacy)
If you’re using Gemini instead of OpenAI Realtime, configure the voice in thegemini section:
Zephyr(default)CoralBreezeNova
Troubleshooting
Voice not changing
If the voice doesn’t change after updatingconfig.yaml:
- Restart the server:
- Verify the config:
- Check logs for configuration errors:
Invalid voice name
If you see an error about invalid voice:- Check spelling (case-sensitive:
alloy, notAlloy) - Verify it’s one of the six supported voices
- Check for extra spaces or quotes
Voice sounds wrong
If the voice doesn’t match expectations:- Try a different voice from the list above
- Check that
openai_realtime.enabled: true - Verify your OpenAI API key has Realtime API access
- Check audio quality issues aren’t affecting perception
Related Configuration
- Environment Variables - Set up
OPENAI_API_KEY - Configuration File - Full
config.yamlreference - OpenAI Realtime API - Official documentation