Using text-to-speech in announcements

Using text-to-speech in announcements

Overview

You can configure Announcer and Menu applets to announce text using a synthesised voice of your choosing. Voices are available from Amazon Polly and, if enabled for your account, Google Cloud Text-to-Speech.

You can define the exact text to announce, or use data sources to supply the text at runtime. You can also specify the voice directly in the applet, or use a data source to supply the voice name at runtime.

For information about the Announcer and Menu applets, see Announcer applet and Menu applet.

Prerequisites

Before using text-to-speech in announcements, ensure the following:

Requirement

Detail

Requirement

Detail

Data sources (if using dynamic text)

Configure data sources in the same interaction plan before configuring the applet.

Neural voices (optional)

The neural voices feature must be enabled for your account to use neural Amazon Polly voices.

Google Cloud Text-to-Speech (optional)

Google text-to-speech must be enabled for your account to use Google voices. Contact your account administrator or Vonage support to request enablement.

Limitations

Limitation

Detail

Limitation

Detail

Maximum text length

The text-to-speech service supports a maximum of 1,500 characters per request. Requests exceeding this limit are rejected.

Neural voice fallback (Amazon)

If the Amazon Polly voice you select is not available in a neural version, the applet automatically falls back to the standard version.

Voice list refresh

The list of available voices is cached for 10 minutes. A newly added Google voice may take up to 10 minutes to appear in the dropdown.

First render latency (Google generative voices)

Uncached Google Chirp3-HD voices may have a longer first render time compared to Wavenet or Standard voices. Subsequent requests for the same text and voice combination are served from the cache.

Voice providers

VCC supports two text-to-speech providers. Both are available through the same voice selection interfaces in Interaction Architect and the flow builder.

Amazon Polly voices

Amazon Polly provides standard and neural voices across a range of languages. You can identify Amazon Polly voices by their name alone (e.g. Joanna) or by using the optional Amazon- prefix (e.g. Amazon-Joanna).

Backward compatibility

Unprefixed voice names default to Amazon Polly for backward compatibility.

To check available Amazon Polly voices and their IDs, see the Voices in Amazon Polly page (Amazon help).

Google Cloud Text-to-Speech voices

If enabled for your account, Google Cloud Text-to-Speech voices are available alongside Amazon Polly voices in the same voice selection interfaces.

Google voices include the following models:

Model

SSML support

Notes

Model

SSML support

Notes

Wavenet

Yes

High-quality neural voices

Neural2

Yes

Next-generation neural voices

Studio

Yes

Premium studio-quality voices

Chirp3-HD

No

Generative voices; SSML tags are automatically stripped

Google voices are identified by the Google- prefix (e.g. Google-en-GB-Wavenet-A). In the voice dropdown, Google voices are displayed in the format: Google - en-GB Wavenet A (Female).

Audio caching

Synthesised audio is cached in Amazon S3 for 30 days. Repeated requests for the same text and voice combination are served from cache with no synthesis delay and at no additional cost. This is especially important when using generative Chirp3-HD voices.

To check available Google voices, see the Google Cloud Text-to-Speech supported voices page (Google help).

Caller hears silence or delay on first play

This can occur when using an uncached generative voice such as Chirp3-HD, which may have a longer first render time. Ensure the audio cache is enabled for your account. After the first render, subsequent plays of the same text and voice combination are served from cache with no delay.

Neural Voices (Amazon Polly)

If enabled for your account, you can use Amazon Polly neural voices to achieve more natural-sounding announcements.

To check whether a voice is neural or standard in VCC:

  1. Open the Menu applet in your interaction plan.

  2. Click the dropdown next to the Voice field.

  3. Neural and standard voices are labelled in parentheses next to the voice name, for example: Burcu (Turkish, neural) or Aditi (Indian English, standard).

Neural voice fallback

If the voice you select is not available in a neural version, the applet automatically switches to the standard version.

For more information, see the AWS Applying the newscaster voice page.

Speech Synthesis Markup Language (SSML)

If enabled for your account, you can use Speech Synthesis Markup Language (SSML) - a W3C standard - to control aspects of speech synthesis, such as adding pauses or spelling out specific words.

For your text to be recognised as SSML, it must begin with a <speak> tag and end with a </speak> tag.

Example:

<speak> Here is a word spelled out: <say-as interpret-as="spell-out">hello</say-as>. </speak>

SSML and Google Chirp3-HD voices

Google Chirp3-HD voices do not support SSML. If you provide SSML markup for a Chirp3-HD voice, the SSML tags are automatically removed and the plain text is synthesised instead. All other Google voice models (Wavenet, Neural2, Studio) fully support SSML.

Not all SSML tags are supported by Amazon Polly. For information on supported and unsupported tags, see the AWS Supported SSML tags page.

SSML not applied to Google voice

If SSML markup is not being applied, you may be using a Chirp3-HD voice, which does not support SSML. Switch to a Wavenet, Neural2, or Studio Google voice model, or remove the SSML markup from your text.

Configuring Text-to-Speech in announcements

Using Data Sources

To use dynamic elements in the Announcer or Menu applet, you must configure data sources in the same interaction plan. These data sources must contain the required values when VCC routes the call to the applet.

The applet sends your configured text to the text-to-speech service, which synthesises the text in the specified voice using either Amazon Polly or Google Cloud Text-to-Speech. The service returns the audio and the applet plays it to the caller.

Configuration steps

To configure text-to-speech in an Announcer or Menu applet:

  1. In your interaction plan, open or create an Announcer or Menu applet.

  2. In the Announcement type list, select Text to speech.

  3. In the Voice field, select or enter the voice you want to use:

    • Use the dropdown to browse available voices. Amazon and Google voices appear together, labelled with their provider prefix (e.g. Amazon - Joanna or Google - en-GB Wavenet A (Female)).

    • To use a Google voice, select it from the dropdown, or type the voice name manually using the Google- prefix (e.g. Google-en-US-Chirp3-HD-Kore).

    • To use an Amazon Polly voice, select it from the dropdown, or type the voice name with or without the Amazon- prefix (e.g. Amazon-Joanna or Joanna). Unprefixed names default to Amazon Polly.

    • You can also use a data source to supply the voice name at runtime. The voice name must match a supported voice ID and is not case-sensitive.

Available voices

To find a full list of available voices and their IDs, see Voices in Amazon Polly (Amazon help) or Google Cloud Text-to-Speech supported voices (Google help).

  1. In the Text field, enter the text you want to announce. The field accepts:

    • Static text, digits, or a combination of both.

    • Dynamic values from data sources. To insert a data source value, type $ - a list of available data sources appears. Click the data source that will contain the required value at runtime. For example: Your balance is $(account(1)|balance).

    • SSML markup (if enabled for your account). Note that SSML is not supported for Google Chirp3-HD voices.

Text field character limit

The text field supports a maximum of 1,500 characters. Requests exceeding this limit are rejected.

  1. Optionally, validate the audio.

  2. Optionally, enable barge-in.

  3. Configure the rest of your interaction plan as required and click Update.

When VCC routes a call through the applet, the caller hears the configured text in the specified voice.

Existing interaction plans

Existing interaction plans using unprefixed voice names continue to use Amazon Polly with no changes required.

 

Support and documentation feedback

For general assistance, please contact Customer Support.

For help using this documentation, please send an email to docs_feedback@vonage.com. We're happy to hear from you. Your contribution helps everyone at Vonage! Please include the name of the page in your email.