I am setting the following SAVG payload in first welcome (entity) node.
var message = {
“type”: “command”,
“command”: “redirect”,
“queueCommand”: true,// it should be false if is first node else it should be true
“data”: [
{
“verb”: “tag”,
“data”: {
“userNoInputCounter”: 1,
“retryCount”: 2
}
},
{
“verb”: “gather”,
“actionHook”: “/actions/hooks”,
“input”: [
“speech”
],
“recognizer”: {
“vendor”: “microsoft”,
“language”: “en-PH”,
“altLanguages”: [“fil-PH”,“zh-CN”,]
},
“bargein”: false,
“listenDuringPrompt”: false,
“timeout”: 15,
“say”: {
“text”: “What can I do for you today?”
// “synthesizer”: {
// “vendor”: “microsoft”,
// “language”: “zh-CN”
// }
}
}
]
}
print(JSON.stringify(message));
Post that, after intent detection, flow is going to Agent Node, where in user might switch language in between, which is mentioned in Agent Node prompt.
Ex: User started with English, and then spoke in Chinese.
Then how do we handle Call Control Parameters, so that, when bot switches from English to Chinese, TTS should work and bot should speak out in Chinese.