Add a voice
This page requires Python familiarity. It covers programmatic voice configuration using provider classes. For no-code voice selection, see the Voice library.
The PolyAI platform supports flexible voice selection for external providers including Cartesia, ElevenLabs, Hume, Rime, Minimax, PlayHT, and Google TTS.
Provider classes
When picking models, adjusting stability, or accessing third-party providers – use provider-specific TTSVoice classes. See the Voice classes reference for the full list of providers and parameters.
Example: Cartesia
Cartesia is the recommended provider for new projects due to its low latency and natural output.
Example: ElevenLabs
Available model IDs: eleven_monolingual_v1, eleven_multilingual_v1, eleven_turbo_v2, eleven_turbo_v2_5, eleven_flash_v2_5, and eleven_v3. The default is eleven_turbo_v2_5.
eleven_v3 limitations:
- Stability: Only supports discrete values:
0.0(Creative),0.5(Natural), and1.0(Robust). Values between these are not supported and may produce unexpected results. - Streaming latency: Do not set
optimize_streaming_latencywhen usingeleven_v3– this parameter is not supported and will cause an error.
Example: Hume
Cache behavior
- Changing
model_iddoes not automatically invalidate cached audio. - To reset cached audio after changing models:
- Go to Voice > Audio library and delete existing cache entries.
- Or, create a new voice entry with a different voice ID.
Prepend the model ID to the voice ID (e.g. eleven_turbo_v2_5/a1b2c3...) to isolate cache entries per model. This is the most reliable way to ensure the correct model is used after a switch.

