audio - 如何在同一Alexa Intent函数中添加两个以上的音频(标记)文件?

标签 audio tags amazon alexa alexa-skills-kit

嗨,我想在我的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/

相关文章:

android - 在Amazon App Store和Android Market上提交Android应用程序?

image - 如何创建没有 EBS 的预留实例的 "Instance Store"AMI 镜像

android - 在android中将录制的声音调制成不同的效果?

c++ - ALSA:如何通过耳机和扬声器发送音频

java - 是否可以控制 Mixer.Info 字符集?

tags - jekyll - 列出 page.tags

javascript - 如何从浏览器中的文本中删除可见的HTML语法?

c# - 在 C# 中快速去/交错数组

html - 强制标签在动态文本中关闭

algorithm - 如何实现标签搜索?