Overview
OpenHome provides two methods for text-to-speech:speak()- Uses the Agent’s default voicetext_to_speech()- Uses a specific voice ID for custom voices
Keep TTS output to 1-2 sentences for natural conversation flow. This is voice, not text.
speak()
Converts text to speech using the Agent’s default voice. This is the most common method for voice output.Signature
The text to convert to speech. Keep it concise (1-2 sentences).
Returns
None - Audio is streamed to the user
Examples
When to Use
- ✅ General Ability output
- ✅ Quick responses and confirmations
- ✅ Error messages
- ✅ When you want consistent voice across the Agent
text_to_speech()
Converts text to speech using a specific voice ID. Use this when your Ability needs its own distinct voice personality.Signature
The text to convert to speech
ElevenLabs voice ID. See Voice ID Reference below.
Returns
None - Audio is streamed to the user
Examples
When to Use
- ✅ Character voices (storytelling, games)
- ✅ Brand-specific voice personality
- ✅ Different voice for different content types (e.g., news vs. meditation)
- ✅ Non-English languages requiring specific accents
Voice ID Reference
Voice IDs are from ElevenLabs. Use these withtext_to_speech().
Featured Voices
American Voices
American Voices
Female
Male
| Voice ID | Gender | Tone | Best For |
|---|---|---|---|
21m00Tcm4TlvDq8ikWAM | Female | Calm | Narration |
EXAVITQu4vr4xnSDxMaL | Female | Soft | News |
XrExE9yKIg1WjnnlVkGX | Female | Warm | Audiobooks |
pMsXgVXv3BLzUgSXRplE | Female | Pleasant | Interactive |
| Voice ID | Gender | Tone | Best For |
|---|---|---|---|
ErXwobaYiN019PkySvjV | Male | Well-rounded | Narration |
GBv7mTt0atIp3Br8iCZE | Male | Calm | Meditation |
TxGEqnHWrfWFTfGW9XjX | Male | Deep | Narration |
pNInz6obpgDQGcFmaJgB | Male | Deep | Narration |
British Voices
British Voices
| Voice ID | Gender | Tone | Best For |
|---|---|---|---|
ThT5KcBeYPX3keUQqHPh | Female | Pleasant | Children’s content |
onwK4e9ZLuTAKqWW03F9 | Male | Deep | News |
Other Accents
Other Accents
| Voice ID | Accent | Gender | Tone | Best For |
|---|---|---|---|---|
D38z5RcWu1voky8WS1ja | Irish | Male | Sailor | Games/Characters |
IKne3meq5aSn9XLyUdCD | Australian | Male | Casual | Conversation |
Best Practices
Keep It Conversational
Break Long Output Into Chunks
Always Speak Errors
Common Patterns
Confirmation Before Action
Progress Updates
Dynamic Voice Selection
Related Methods
Listening
Combine with user_response() for two-way conversation
Audio
Play pre-recorded audio files
