Multilanguage voice bots
Create voice bots that are support all languages added in your bot.
Last updated
Create voice bots that are support all languages added in your bot.
Last updated
This documentation will guide you on enabling accessibility in all supported languages through intent recognition and DTMF.
For multilanguage text bots, please read this page of our documentation.
A multilanguage voice bot will work best if you have your bot already translated into all the languages you want to support. Here's a link to the translations documentation.
Here are the two options you can use, together or separately, to change the language of a voice bot during a call:
In the example below, we've created an entity called language
to identify the languages that are available in the bot and have set a value for them:
en for English
pt for Portuguese
es for Spanish
The intent of this example is called 'change language' and is using the entity language
There is an internal variable that needs to receive a new value every time the language of the bot should change during a call. It's called preferredLanguage
Once the 'change language' intent is recognized:
There is a Go to dialogstate that will capture the value of the entity language
and use it to inform the new language to the preferredLanguage
variable. In the screenshot below, if the expression used was "can you speak Portuguese", the language
entity will assume the value 'pt', as was previewed while creating the entity.
We are using that value to set the condition of the Go to and overwrite the language for the preferredLanguage
variable with the same language code.
We suggest doing this for every language that is supported by your bot and not just assuming any value that comes with the entity language
. This way the bot will have an accurate response if a user ask for a language that is not supported.
To use DTMF to change the language, you need to inform the users which number to press for each language.
Use an Input validation to save the number informed by the user in a variable.
After that, use a Go to to redirect the users to the next steps while also passing the new value for the preferredLanguage
variable:
press 1 for English
press 2 for Portuguese
press 3...
The "your new language" dialogstate from the screenshot above will use the translation that matches the language passed on to preferredLanguage
Happy bot building and:
en: See you soon
pt: Atรฉ logo
es: Hasta luego