嗨,我想在我的Alexa技能中使用两个以上的音频标签,并且按照Alexa的要求编辑音频,并且音频不超过250秒。我想让Alexa讲音频,我有五个音频文件,所以有五个音频标签,我该怎么办让Alexa连续说出5个音频标签
我已将网站链接重命名。由于某些原因,顺便说一下,网站链接可以正常运行
const Thiriller = {
canHandle(handlerInput) {
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'Thiriller';
},
handle(handlerInput) {
var audio = "<audio src='https://lul.com/wp-content/uploads/2019/Flight%20PT1.mp3?_t=1567452928'/>";
var audio1 = "<audio src='https://lul.com/wp-content/uploads/2019/Flight%20Pt2.mp3?_t=1567452928'/>";
return handlerInput.responseBuilder
.speak(audio)
.speak(audio1)
//.reprompt('add a reprompt if you want to keep the session open for the user to respond')
.getResponse();
}
};
最佳答案
试试这个。
return handlerInput.responseBuilder
.speak(audio + audio1)
//.reprompt('add a reprompt if you want to keep the session open for the user to respond')
.getResponse();
如果需要5个背靠背
.speak(音频+音频1 +音频2 +音频3)
只需确保总持续时间不超过240秒的SSML音频限制即可。
关于audio - 如何在同一Alexa Intent函数中添加两个以上的音频(标记)文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57776299/