Twilio Studio Gather Input on Call Widget multi-lingual with TwiML Bin

809 Views Asked by At

Using Twilio Studio to build a multi-lingual IVR.

First it starts with a Gather Input on Call widget which is used to determine the users language - eg. 1 for English, 2 for Spanish etc..

By default the Text to Say field in the widget supports one voice language and cannot be split into multiple fields. This is important because if the system speaks Spanish with an English voice the pronunciation will be almost unrecognisable.

One possible workaround is to create a TwiML Bin (below) that would state the text in the relevant languages. However, the Gather Input on Call widget does not accept the URL to this TwiML Bin as something it can play and treats the widget as if no input has been made skipping instantaneously to the next widget.

How can this be done. It would be easier to keep this in Studio even if it involves a function so that the requisite client in this matter has the ability to edit the IVR over time.

TwiML Bin:

<?xml version="1.0" encoding="UTF-8"?>

<Response>
    <Say voice="alice" language="en-GB">Thank you for calling.</Say>
    <Say voice="alice" language="en-GB">To continue in English, press 1.</Say>
    <Say voice="alice" language="fr-FR">Pour français, tapé 2.</Say>
    <Say voice="alice" language="es-ES">Para español, pulse 3.</Say>
</Response>
2

There are 2 best solutions below

1
On BEST ANSWER

That is not possible all within one Gather widget, as you indicated. If you had multiple Say/Play Widgets before the Gather widget, then your caller wont be able to barge in and make a selection which isn't ideal.

You can record a media/mp3 file and present that multi-language prompt or record the results of your TwiML bin/TTS output and use that recording as the media file for your Gather widget.

Alan

2
On

This is how it worked for me:

  • You have to create a gather_input_on_call and a split_basedon for each language.
  • Set all conditions in EVERY spit_basedon. (so as entries will be execued in whenever step it occurs)
  • Link every no key_match to the next languange gather_inputoncall.
  • Link every no_input to the next gather language.
  • Assign each condition in every split_based on to where they should be directed.
  • Enjoy diversity