...
Refer, https://cloud.google.com/dialogflow/es/docs/reference/language
Google Dialogflow
If you are creating a chatbot that is specific to a language, consider creating a new agent with the chosen language as the default language.
New Agent
Create an Agent in Dialogflow. See, How to Create an agent.
Name the Agent and select a default language from the dropdown.
...
For an existing Agent, you can add languages by clicking on the icon under the gear icon.
...
.
Consider creating a new agent with a chosen language as the default language if you want the chatbot to work in the chosen language permanently,
In the languages tab, select a language from the dropdown to add it 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
...
Warning |
---|
After deployment, the language will change to the default language. |
...
Parser and add the below code.
Code Block |
---|
msg.payload.languageCode = "<language tag>" |
...
Refer, https://cloud.google.com/dialogflow/es/docs/reference/language 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.
Code Block |
---|
"speechToTextLanguage": "Language Code" |
...
Refer, https://cloud.google.com/text-to-speech/docs/voices for the Language Code.
Deployment
Go to Side Navigation menu > Develop > Deployment > Goggle Tab
...
The language selected in the Deployment screen should already be added prior 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.
...