我是技能发展的新手。我想测试一下如何在我的技能中使用SSML。因此,我创建了以下代码块。
else if(light == "right"){
pin = "Right";
pinvalue = "HIGH";
speechOutput = {
type:"AlexaSkill.speechOutputType.SSML",
ssml:"<speak>Ok! starting the car. Please make sure you have fasten your seat belts </speak>"
};
}这就是我所说的
response.ask(speechOutput);当我运行和测试这个特定的代码块时,我没有得到任何错误,并收到以下响应。
"version": "1.0",
"response": {
"outputSpeech": {
"type": "PlainText",
"text": {
"type": "AlexaSkill.speechOutputType.SSML",
"ssml": "<speak>Ok! starting the car. Please make sure you have fasten your seat belts </speak>"
}
},
"shouldEndSession": false
},
"sessionAttributes": {}
}与这段代码相关联的指示灯也会正常亮起。但是,当我在服务模拟器中运行相同的代码时。灯仍然正确地打开,然而,这是我得到的输出。
The remote endpoint could not be called, or the response it returned was invalid.我尝试在服务模拟器中运行其余的块,它们都给出了正确的响应。我在这里做错了什么?
发布于 2017-03-12 23:19:44
你有
speechOutput = {
type:"AlexaSkill.speechOutputType.SSML",
ssml:"<speak>Ok! starting the car. Please make sure you have fasten your seat belts </speak>"
};请注意,您可能打算引用一个属性"AlexaSkill.speechOutputType.SSML",而不是将其设置为字符串文字。因此,删除引号。
https://stackoverflow.com/questions/42747924
复制相似问题