Picking a voice
Learn to configure text-to-speech (TTS) voices for Twilio Conversation Relay by setting the ttsProvider and voice attributes in your TwiML. To do this, pick a provider, select a voice ID from the available inventory, and specify it within your <ConversationRelay> configuration. You can use this guide to create AI agents and AI/ML transcription.
See Related reference documentation to learn more about the <ConversationRelay> and TwiML elements used in this guide.
Info
If your workflow is subject to PCI, not all TTS and transcription providers are guaranteed to be PCI compliant. See Twilio's Responsibility Matrix for further information.
Support for Speech Synthesis Markup Language (SSML) tags varies by TTS provider in Conversation Relay:
- Google and Amazon Polly: These engines support a wide range of SSML tags. To review a complete list of supported tags, see the SSML documentation.
- ElevenLabs: ElevenLabs v3 and v4 don't support SSML. Use audio tags instead. Earlier ElevenLabs models support only the
<phoneme>tag, and only for theen-USlanguage. See the ElevenLabs documentation for details.
For voices from Google or Amazon (including generative options), refer to our Twilio TTS Voices documentation. Each provider offers a variety of languages and styles, enabling you to tailor your application's voice experience to your specific needs.
- Browse the available voices in the Available voices and languages table. Test them using the Twilio Console to find the one that best fits your application's requirements.
- Copy the voice ID from the table (for example,
en-US-Wavenet-D). - Configure the
<ConversationRelay>noun in TwiML: SetttsProvidertoGoogleorAmazonand use the copied voice ID in thevoiceattribute.
Conversation Relay supports ElevenLabs v3 and v4 text-to-speech models, which produce expressive, emotionally adaptive speech. We recommend ElevenLabs v4. Compared with earlier models, v4 reduces median inference latency to about 100ms for faster turn-taking, supports 90+ languages with native accents, and needs less prompt engineering to sound natural.
Use the voice search tool on this page to search and filter through a wide selection of ElevenLabs voices by language, accent, age, and more. Each voice entry includes a voice ID that you can copy and paste into your <ConversationRelay> configuration.
- Search or filter: Pick a voice using the search tool that matches your requirements.
- Copy the voice ID: From the search results, copy the voice ID (for example,
21m00Tcm4TlvDq8ikWAM). - Configure the
<ConversationRelay>noun: In your TwiML, setttsProvider="ElevenLabs"and use the copied voice ID in thevoiceattribute. - Select ElevenLabs v4 (recommended): Append
-v4to the voice ID. For example,21m00Tcm4TlvDq8ikWAM-v4. - Customize your voice (optional): Append
stabilityandsimilarityvalues to the model, for example21m00Tcm4TlvDq8ikWAM-v4-0.35_0.8. Give both values or neither. See Voice string format.
Example:
1<Connect>2<ConversationRelay url="wss://example.com/websocket" ttsProvider="ElevenLabs" voice="21m00Tcm4TlvDq8ikWAM-v4" ... />3</Connect>
Append a model to the voice ID with a hyphen. Use one of the values in the following table, without an eleven_ prefix.
| Model | Values for the voice attribute |
|---|---|
| ElevenLabs v4 (recommended) | <VOICE_ID>-v4 or <VOICE_ID>-v4_turbo |
| ElevenLabs v3 | <VOICE_ID>-v3 or <VOICE_ID>-v3_conversational |
| Earlier models | See Other ElevenLabs models |
Conversation Relay reads the model and the voice settings from the voice attribute. Use the following format:
[Voice ID]-[Model]-[Speed]_[Stability]_[Similarity]
Use a hyphen between the voice ID, the model, and the settings. Use underscores between the individual setting values. Don't use hyphens and underscores interchangeably. Add the values in the following order. The settings are optional, but if you add them, give every value for the model: speed, stability, and similarity for earlier models, or stability and similarity for v3 and v4. Write each value with one or two decimal places, such as 0.5 or 0.35.
| Position | Parameter | Description | Supported values |
|---|---|---|---|
| 1 | Voice ID | The 20-character ElevenLabs voice ID. Required. | For example, 21m00Tcm4TlvDq8ikWAM |
| 2 | Model | The ElevenLabs model. Optional. | v4, v4_turbo, v3, v3_conversational, and earlier model IDs |
| 3 | Speed | The speech speed multiplier. Applies to earlier models only. For v3 and v4, omit it or set it to 1.0. Conversation Relay rejects any other value. | 0.7 to 1.2. The default is 1.0. |
| 4 | Stability | How consistent the voice is compared to how much its emotion varies. Required when you add settings. | 0.0 to 1.0 |
| 5 | Similarity | How closely the output matches the original voice. Required when you add settings. | 0.0 to 1.0 |
The following examples show valid voice values for v4:
21m00Tcm4TlvDq8ikWAM-v4: v4 with the default stability and similarity.21m00Tcm4TlvDq8ikWAM-v4-0.35_0.8: v4 with astabilityof0.35and asimilarityof0.8. Lowerstabilitygives the model more freedom to act on audio tags.21m00Tcm4TlvDq8ikWAM-v4-1.0_0.35_0.8: v4 with the four-value format. v3 and v4 don't support speed control, so thespeedvalue must be1.0. A different value, such as1.2, is rejected.
If you upgrade an application from an earlier ElevenLabs model, make the following changes:
- Remove SSML
<break>tags from your text. - Replace speed adjustments with pacing tags, or choose a voice whose natural pace matches your application. Each ElevenLabs voice has its own pace. v3 and v4 don't support the
speedsetting, and Conversation Relay rejects a v3 or v4 voice string with aspeedother than1.0. Remove thespeedvalue from the voice string, or set it to1.0.
If you don't specify a model, ElevenLabs voices use the Flash 2.5 model by default, except for en-US, which uses Flash 2 (flash_v2). Other models are available and could improve the quality or performance of your application depending on your use case.
To use one of these models, append a hyphen to the voice ID followed by the model ID. The supported model IDs include flash_v2, turbo_v2_5, turbo_v2, and the defaults, flash_v2_5 and flash_v2 (for en-US). Some models only work with a specific set of languages. You can learn about the strengths and the supported languages of each model on the ElevenLabs website.
With these models, you can also adjust the speed and other characteristics of your voice. Add a hyphen to the end of the voice attribute followed by an underscore-separated string with values for speed, stability, and similarity respectively. The speed should be a value between 0.7 and 1.2, and the stability and similarity values can range from 0.0 to 1.0.
For example, a voice attribute of XrExE9yKIg1WjnnlVkGX-1.2_0.6_0.8 sets the speed to 1.2, the stability to 0.6, and the similarity to 0.8. See the ElevenLabs documentation to learn more about how these settings affect your application's voice.
Example:
1<Connect>2<ConversationRelay url="wss://example.com/websocket" ttsProvider="ElevenLabs" voice="NYC9WEgkq1u4jiqBseQ9-turbo_v2_5-0.8_0.8_0.6" ... />3</Connect>
For SSML, earlier ElevenLabs models support only the <phoneme> tag, and only for the en-US language. See SSML support by provider.
If you don't explicitly specify the voice attribute in your <ConversationRelay> configuration, Conversation Relay automatically applies a default voice based on the language setting (as defined by the language or ttsLanguage attribute) and the selected TTS provider (default is ElevenLabs). The following table lists the default voice settings for the languages that have them. For other languages, ElevenLabs uses the voice UgBBYS2sOqTuMpoF3BR0:
| Language | Voice ID | TTS provider | Speech model | Transcription provider |
|---|---|---|---|---|
| multi | ygiXC2Oa1BiHksD3WkJZ | ElevenLabs | nova-3-general | Deepgram |
| bg-BG | AB9XsbSA4eLG12t2myjN | ElevenLabs | nova-3-general | Deepgram |
| cs-CZ | uYFJyGaibp4N2VwYQshk | ElevenLabs | nova-3-general | Deepgram |
| da-DK | ygiXC2Oa1BiHksD3WkJZ | ElevenLabs | nova-3-general | Deepgram |
| de-DE | FTNCalFNG5bRnkkaP5Ug | ElevenLabs | nova-3-general | Deepgram |
| en-AU | 9Ft9sm9dzvprPILZmLJl | ElevenLabs | nova-3-general | Deepgram |
| en-GB | Fahco4VZzobUeiPqni1S | ElevenLabs | nova-3-general | Deepgram |
| en-IN | mCQMfsqGDT6IDkEKR20a | ElevenLabs | nova-3-general | Deepgram |
| en-US | UgBBYS2sOqTuMpoF3BR0 | ElevenLabs | nova-3-general | Deepgram |
| es-ES | 6xftrpatV0jGmFHxDjUv | ElevenLabs | nova-3-general | Deepgram |
| es-US | uDhfdG2VwEjWZ4JYzggn | ElevenLabs | nova-3-general | Deepgram |
| fi-FI | 6xPz2opT0y5qtoRh1U1Y | ElevenLabs | nova-3-general | Deepgram |
| fr-CA | IPgYtHTNLjC7Bq7IPHrm | ElevenLabs | nova-3-general | Deepgram |
| fr-FR | a5n9pJUnAhX4fn7lx3uo | ElevenLabs | nova-3-general | Deepgram |
| hi-IN | IvLWq57RKibBrqZGpQrC | ElevenLabs | nova-3-general | Deepgram |
| hu-HU | TumdjBNWanlT3ysvclWh | ElevenLabs | nova-3-general | Deepgram |
| id-ID | 1k39YpzqXZn52BgyLyGO | ElevenLabs | nova-3-general | Deepgram |
| it-IT | uScy1bXtKz8vPzfdFsFw | ElevenLabs | nova-3-general | Deepgram |
| ja-JP | 3JDquces8E8bkmvbh6Bc | ElevenLabs | nova-3-general | Deepgram |
| kn-IN | kn-IN-Standard-A | long | ||
| ko-KR | uyVNoMrnUku1dZyVEXwD | ElevenLabs | nova-3-general | Deepgram |
| ml-IN | ml-IN-Standard-A | long | ||
| mr-IN | mr-IN-Standard-A | long | ||
| nl-BE | s7Z6uboUuE4Nd8Q2nye6 | ElevenLabs | nova-3-general | Deepgram |
| nl-NL | UNBIyLbtFB9k7FKW8wJv | ElevenLabs | nova-3-general | Deepgram |
| pl-PL | W0sqKm1Sfw1EzlCH14FQ | ElevenLabs | nova-3-general | Deepgram |
| pt-BR | CstacWqMhJQlnfLPxRG4 | ElevenLabs | nova-3-general | Deepgram |
| pt-PT | pt-PT-Standard-A | nova-3-general | Deepgram | |
| ro-RO | OlBp4oyr3FBAGEAtJOnU | ElevenLabs | nova-3-general | Deepgram |
| ru-RU | AB9XsbSA4eLG12t2myjN | ElevenLabs | nova-3-general | Deepgram |
| sv-SE | 4xkUqaR9MYOJHoaC1Nak | ElevenLabs | nova-3-general | Deepgram |
| ta-IN | ZhJ5LanYnCmLKQUXvsV7 | ElevenLabs | long | |
| te-IN | te-IN-Standard-A | long | ||
| th-TH | th-TH-Standard-A | nova-2-general | Deepgram | |
| tr-TR | IuRRIAcbQK5AQk1XevPj | ElevenLabs | nova-3-general | Deepgram |
| uk-UA | nCqaTnIbLdME87OuQaZY | ElevenLabs | nova-3-general | Deepgram |
| vi-VN | foH7s9fX31wFFH2yqrFa | ElevenLabs | nova-3-general | Deepgram |
Unless you specify a model, ElevenLabs voices use Flash 2 for en-US and Flash 2.5 for other languages. To use ElevenLabs v4, append -v4 to the voice ID. Our internal configuration defines these default settings and updates them periodically. Refer to the Twilio TTS voices documentation for a complete and current list of supported languages, default voices, and detailed settings.
This guide teaches the basics required for the following use cases:
You can use this guide to select natural-sounding, low-latency voices that enhance the realism of your autonomous AI agents. By choosing specific providers like ElevenLabs, you can tailor the personality and tone of your AI agent to better suit your brand's customer service experience.
To learn more advanced features that you can use with AI agents, see AI agents.
You can use this guide to define the voice output for applications that simultaneously capture and transcribe audio for downstream machine learning analysis. Configuring the right TTS engine ensures that your application provides high-quality audio interactions while your system processes real-time data.
To learn more advanced features that you can use with AI or ML transcription, see Voice AI/ML transcription.
After following this guide, you can successfully configure and customize the text-to-speech voice for your Twilio Conversation Relay application. You can confirm it worked by making a test call to your application and verifying that the relay uses your selected provider and voice ID with the specific speed, stability, and similarity settings you defined.
Explore the following guide to build on what you've learned in this guide:
- Getting and sending WebSocket messages: Understand how to handle real-time data exchange between Twilio and your application via WebSockets.
- Update configuration during a call: Change the voice and other settings while a call is in progress.