0
我正在努力尝试从可公开访问的S3存储桶流式传输MP3文件的Alexa技能。我的lambda函数正常工作,并返回一个音频指令。我正在使用npm包alexa-sdk。
但是,当响应被发送回Echo设备时,我收到了一个“您的技能响应出现错误”的通用错误。我搜索了一些Alexa响应小组的类型来尝试和验证我的响应对象。
下面是我的lambda函数IntentHandler,以及从所述函数返回的响应对象。有人可以看看并指出他们看到的任何错误吗?非常感谢。
var handlers = {
'LaunchRequest': function() {
this.emit(':tell', 'Hello');
},
GetVoiceMailIntent: function(){
this.response.audioPlayerPlay('REPLACE_ALL', 'https://s3.amazonaws.com/romevm/call_1001.mp3', 'vmtoken', 0);
this.emit(':responseReady');
},
SessionEndedRequest: function() {
console.log('session ended!');
}
} //end intent handlers
*********** RESPONSE **************
{
"version": "1.0",
"response": {
"speechletResponse": {
"directives": [
{
"playBehavior": "REPLACE_ALL",
"audioItem": {
"stream": {
"expectedPreviousToken": "0",
"token": "vmtoken",
"url": "https://s3.amazonaws.com/romevm/call_1001.mp3",
"offsetInMilliseconds": 0
}
}
}
],
"shouldEndSession": true
}
},"sessionAttributes": {}
}