Using text-to-speech in announcements

How do I use text-to-speech in announcements?

You can configure Announcer and Menu applets to announce text in a voice of your choosing. You can either define the exact text to be announced or the data sources that will contain the text to be announced at run time. You can also specify the voice you want to use for the text in the applet, or use a data source that will contain the name of the voice at runtime. For information about the Announcer and Menu applets, see Announcer applet and Menu applet.

You can only use this applet in an interaction plan that routes calls, and not other types of interactions.

 Using data sources

To use any dynamic elements in the Announcer and Menu applets, you must configure data sources. These data sources must contain the required values for the elements when Vonage Contact Center routes the call to the applet.

You can use any applet that stores data in a data source to create the data sources. The following applets create data sources:

  • Data Connector applet. For information about the Data Connector applet, see Data Connector applet.
  • IVR Collect Digit applet. For information about the IVR Collect Digit applet, see IVR Collect Digit applet.
  • IVR Collect Digit String applet. For information about the IVR Collect Digit String applet, see IVR Collect Digit String applet.
  • IVR Set Menu Digit applet. For information about the IVR Set Menu Digit applet, see IVR Set Menu Digit applet.
  • IVR Set Menu String applet. For information about the Set Menu String applet, see IVR Set Menu String applet.
  • Set Data Source applet. For information about the Set Data Source applet, see Set Data Source applet.

You can also use an existing data source; by default, all calls have the following data sources available:

  • Call Guid
  • CLID
  • Dialled Number

    The Dialled Number ($(DialledNumber)) data source contains the ID of the interaction plan rather than its phone number. The ID and the phone number will often be the same, but this is not guaranteed. Therefore you should not use $(DialledNumber) to indicate the number dialed by the caller.

  • Language
  • First Agent ID

    First Agent ID is only populated after Vonage Contact Center has routed the call through an ACD applet to an agent.

  • DisplayName. By default, DisplayName contains the CLID of the inbound caller. For information about using a custom value in the DisplayName data source, see Setting a display name for an inbound interaction.
  • InteractionOutcome. By default, InteractionOutcome contains the outcome of the interaction. For information about interaction outcomes, see Interaction outcomes.
  • Interaction Start Time. The time, in UTC, that the interaction starts. For callbacks, InteractionStartTime will be the start of the original interaction.

If you use a post-call named route for post-interaction processing, all data sources configured at the time the interaction finishes (including InteractionOutcome) are available to the target named route.

The applet sends your configured text to the Amazon Polly service which turns your text into speech in the specified voice. The service returns the speech and the applet plays it.

To use text-to-speech in announcements, perform the following steps:

  1. In the same interaction plan as your data sources (if using data sources), create an Announcer or Menu applet.
  2. In the Announcement type list, click Text to speech. Depending on which applet you are creating, you can configure the voice that announces the menu options in different ways.

     Menu applet

    If you are creating a Menu applet, the Dynamic voice check box appears.

    • To announce the menu options in a voice that is set at runtime from the data source you define in Voice data source, select Dynamic voice. Voice data source appears.
      Voice data source contains a list of available data sources. S
      elect the data source that will contain the required value at run time.
    • To announce the menu options in the same voice every time, clear Dynamic voice. Voice appears.
      Voice contains a list of voices available in Amazon Polly. Select the voice you want to use to announce menu options.
     Announcer applet

    If you are creating an Announcer applet, Voice appears.

    In Voice, define the voice you want to use to announce the text. You can use either a static value or a dynamic value from a data source.

    • To use a static value, type the voice you want to use. The applet validates the voice when you click Update.
    • To use a dynamic value from a data source, type the dollar sign ($). A list of available data sources appears. Click the data source that will contain the required value at run time.
      For example, $(Contact|TextToSpeech_voice__c).

    The Voice field can contain a maximum of 50 characters.  

    Whether you use a static or dynamic value for the voice, it must match the voice ID provided by Amazon Polly. The voice is not case-sensitive. For a list of voices available in Amazon Polly and their IDs, see Voices in Amazon Polly (Amazon help).

    Neural voices

    We only support standard voices; neural-only voices are not supported. For information about neural voices, see NTTS Speaking Styles.
  3. In Text, define the text you want to be announced.
    The Text field can contain text, digits, or a combination. You can include both static values and dynamic values from data sources.
    To use a dynamic value from a data source, type the dollar sign ($). A list of available data sources appears. Click the data source that will contain the required value at run time
    For example, Balance is $(account(1)|balance)
    The Text field can contain a maximum of 1500 characters.
  4. Optionally, you can validate the audio.
    To test the audio, click the Play or Download buttons. VCC uses the Voice and Text values to generate audio.

    Data sources

    When generating test audio, VCC cannot replace any data sources in the Voice and Text fields with actual values. Therefore, the Voice field must contain the name of the voice to use in the announcement.

    VCC announces data source names in the Text field—including the '$'—as if they are text. At runtime, VCC will include data source values in the audio as expected.

  5. Optionally enable barge-in.
    Select the Enable barge-in check box to enable barge-in. Clear the Enable barge-in check box to disable barge-in.

    Barge-in

    If you enable barge-in and follow this applet with a Menu Tone applet, callers can press any key on their telephone keypad to skip the rest of this announcement. The key that the caller presses is logged and used by the following Menu Tone applet.

    If you enable barge-in for a chain of announcements between this and the Menu Tone applet, callers will skip these announcements too. If intermediate announcements do not have barge-in enabled, the caller's keypress is not passed to the Menu Tone applet and is lost.

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

Now when Vonage Contact Center routes a call through the applet, the caller hears the configured text in the specified Amazon Polly voice.

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.