在 Alexa V1 中,可以使用 ssml 轻松地在响应中建立暂停。
this.emit(':tell', "Pause now <break time='1s'/>. Start again");
但在 Alexa SDK V2 中,代码(对特殊字符进行编码):
handle(handlerInput) {
return handlerInput.responseBuilder
.speak( "Pause now <break time="1s"/>. Start again")
.getResponse();
},
给出了没有停顿的回应,但重复了下面的句子。 “现在暂停。重新开始”
然后我们如何暂停 Alexa SDK v2 的响应构建器?
最佳答案
看起来像是语法问题。我在我的测试技能中测试了一个类似的片段。这应该运作良好。
handle(handlerInput) {
return handlerInput.responseBuilder
.speak('Pause now <break time="1s"/>. Start again')
.getResponse();
},
关于javascript - 在 alexa sdk v2 responsebuilder 中暂停,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53590123/