DIalogflow Telephony integration is interpreting SSML response from webhook as normal text

送分小仙女□ 提交于 2019-12-23 03:03:25

问题


I am using dialogflow-fulfillment nodejs library to send response(eg: agent.add("<speak>hello</speak>")) back to the dialogflow agent. It works fine with dialogflow agent and google simulator. However, when I use the same response with telephony integration. It does not recognize it as "ssml" and speak it as "greater than speak less than....hello less than slash ..greater than>. Also. I checked SDK supported platforms and it looks like version 0.6.1 does not support telephony Platform yet.


回答1:


You are correct that the client API doesn't include methods for the telephony gateway, so you'll need to craft the JSON response yourself. This is an example of what you can put for "fulfillmentMessages":

fulfillmentMessages: [
    {
        platform: 'TELEPHONY',
        telephonySynthesizeSpeech: { 
            ssml: `<speak>YOUR MESSAGE GOES HERE</speak>`
        }
    }
]

Here's the link to the relevant API v2 beta 1 documentation (scroll down to TelephonySynthesizeSpeech): https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2beta1#telephonysynthesizespeech



来源:https://stackoverflow.com/questions/53147924/dialogflow-telephony-integration-is-interpreting-ssml-response-from-webhook-as-n

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!