How to configure a multi-lingual bot
This document helps you configure the chatbot in your favorite language.
Refer Language Support in Orbita Chatbot to change the language of the chatbot labels.
- 1 Speech to text
- 1.1 Google Dialogflow
- 1.1.1 New Agent
- 1.1.2 Existing Agent (temporary)
- 1.2 Experience Designer
- 1.3 Experience Manager
- 1.3.1 Chatbot Settings
- 1.3.2 Deployment
- 1.1 Google Dialogflow
- 2 Text to speech
Speech to text
Any voice input given to the chatbot is converted to the configured language using the settings below.
In Orbita, you can only choose the languages supported by Google for Speech to text conversion.
Refer, Language reference | Dialogflow ES | Google Cloud
Google Dialogflow
New Agent
Create an Agent in Dialogflow. See, How to Create an agent.
Name the Agent and select a default language from the dropdown.
Existing Agent (temporary)
For an existing Agent, you can add languages by clicking on the icon under the gear icon.
In the languages tab, select a language from the dropdown to add the language to your agent.
You can see the list of languages added to an Agent under the Agent name in the side menu.
Experience Designer
Go to the Bot Manager flow > Bot Provider V2 node > Bot In Parser and add the below code.
msg.payload.languageCode = "<language tag>"
Refer, Language reference | Dialogflow ES | Google Cloud for the Language tag.
You will get the Language tag from the Tag* column.
Experience Manager
Chatbot Settings
Navigate to Project Side navigation menu >Chatbot Settings > Settings tab and add the below code to the appSettings
object.
"speechToTextLanguage": "Language Code"
Refer, Supported voices and languages | Cloud Text-to-Speech API | Google Cloud for the Language Code.
Deployment
Go to Side Navigation menu > Develop > Deployment > Goggle Tab
Select your Agent and Language from the dropdown.
The language selected in the Deployment screen should already be added in the Dialogflow agent.
Text to speech
The text is converted to speech in the preferred language with the settings below.
Experience Designer
You can change the output voice settings of your voice agent by changing the properties in the Experience Designer > Bot Manager flow> Bot Provider V2 node > Text To Speech Config.
You can use "languageCode": "es-ES"
and "ssmlGender": "FEMALE"
properties for Spanish(Female voice).
To be more specific, use "name": "es-ES-Wavenet-B"
Spanish(Male) to use Standard or Wavenet voices. Supported voices and languages | Cloud Text-to-Speech API | Google Cloud
Property | Description |
---|---|
| You can select the language accent in which you want the output voice using this property. You can choose from the below: Arabic — |
| You can also choose the gender for the voice output. You can choose from |
| You can try out different variations on how the voice output can be with this property. |
| You can choose the audio encoding of your choice from the below mentioned.
|
Troubleshooting
If you have carefully followed this document and configured your multilingual chatbot but cannot get it to work in the language you desired,
Remove App Settings function node
Go to Experience Designer>Bot Manager flow
Look for the App Settings function node.
Remove the App Settings function node and the connected nodes/flow.
Deploy the flow
Reset the Settings in the Bot View Template node
Go to the Experience Designer>Bot Manager flow >Bot View template > Settings tab.
Remove the existing code in the Settings tab and click Done. (All the properties will be reset to default)
Deploy the flow.
Your chatbot should now work in the configured language.
Related Articles