Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Choose a voice for Twilio ConversationRelay


Picking a voice for your ConversationRelay application helps create an engaging user experience. Twilio supports text-to-speech voices from Google, Amazon Polly, and ElevenLabs. Text-to-Speech (TTS) voice quality varies significantly by provider and voice type. While generative voices often offer higher fidelity and more natural-sounding responses, they might increase response latency and process TTS at a slower rate.


Default voice settings

default-voice-settings page anchor

If your <ConversationRelay> lacks a voice attribute, ConversationRelay applies a default voice based on the language setting defined with the language or ttsLanguage attribute and the selected TTS provider. Twilio uses ElevenLabs as the default TTS provider.

The Twilio internal configuration defines these default settings. The defaults get updated periodically. For a complete and current list of supported languages, default voices, and detailed settings, see the Twilio TTS Voices documentation.


Choose a specific voice for your app

choose-a-specific-voice-for-your-app page anchor

Each provider offers a variety of languages and styles. Choose one that best reflects your app's voice experience.

From the Text-to-Speech page, you can choose default voices for when you haven't set specific values in a TwiML file for:

  • An language or voice attribute as the Default Voice
  • A voice attribute for a combination of language and locale as Language Mappings

When setting these default values, you can listen to a sample of a specific voice. This procedure explains how to listen to a voice sample while setting the Default Voice.

GoogleAmazonElevenLabs

Choose a Google Text-to-Speech voice

To review the list of voices from Google, see the Twilio TTS Voices documentation.

Sample an Google Text-to-Speech voice

To sample an Google Text-to-Speech voice and set your default voice:

  1. Go to the Text-to-Speech page in the Twilio Console(link takes you to an external page).
  2. Choose Google Text-to-Speech from the Your Default Provider dropdown menu.
  3. Click the Test & Configure link. The Test & Configure Your Default Voice modal appears.
  4. Choose a language and locale from the Language dropdown menu.
  5. Choose a voice from the Voice dropdown menu.
  6. If desired, change the text in the Test this voice prompt. Any voice tests read the text in this box.
  7. Click the play button (▶) next to the Test this voice prompt.
  8. When you fing your desired voice, click Save. This closes the Test & Configure Your Default Voice modal.

The default voice for your ConversationRelay changed to your chosen voice and the Default Voice option displays your chosen voice.

Choose a Google Text-to-Speech voice

  1. Browse the available voices in the Available voices and languages table on the Text-to-Speech page.
  2. To filter the available choices to Google only, set Provider to Google.
  3. You can filter the available voices using these parameters:
    • Language and locale
    • Type
    • Gender
  4. Test them using the Twilio Console(link takes you to an external page) to find the one that best fits your application's requirements.
  5. Select the Voice ID in the Voice column in the table. An example would be en-US-Wavenet-D.
  6. Copy this value.

Use a Google Text-to-Speech voice in your TwiML file

  1. Create or open an existing TwiML file.

  2. Create a new <Connect> tag or go to an existing one.

  3. In the <Connect> tag, add an unpaired <ConversationRelay> noun.

  4. In the <ConversationRelay> noun, set the following attributes:

    • Add a url attribute set to the value of your Websocket server.
    • Add a ttsProvider attribute set to the value of Google.
    • Add a voice attribute set to the value of the voice ID copied in the previous section.

    Example TwiML app that uses Google for ConversationRelay

    example-twiml-app-that-uses-google-for-conversationrelay page anchor
    1
    <Connect>
    2
    <ConversationRelay
    3
    url="wss://example.com/websocket"
    4
    ttsProvider="Google"
    5
    voice="en-US-Chirp3-HD-Charon"
    6
    ... />
    7
    </Connect>
  5. Save your TwiML file.