Skip to main content
How the agent sounds is controlled by the text-to-speech plugin in the pipeline. Each TTS provider exposes a voice plus tuning knobs; set them on the plugin’s constructor.

Choose a voice

Pass the provider’s voice identifier. Voices and the exact option names vary by provider. See each TTS plugin page for the full list.

Common tuning knobs

The exact set depends on the provider, but most TTS plugins support some of:
For voice agents, lower latency usually beats richer prosody. Prefer a fast model and streaming synthesis, and keep replies short.

Speaking on demand

Make the agent speak a specific line at any time with session.say():
To fix how specific words are pronounced (acronyms, brand names), transform the text before it reaches TTS. See Text Transformation.

References

Examples

Enhanced Pronunciation

Customize pronunciation of names and terms.

Multilingual Demo

Switch speech languages within an agent.

SDK Reference

Speech Generation

Speech Generation in the Python API reference.

TTS

TTS in the Python API reference.