친구,방법은 장치에 나는 공개적으로 액세스 할 수있는 S3 버킷에서 MP3 파일을 스트리밍 할 시도하는 알렉사 기술에서 일하고 있어요
을 mp3 파일을 스트리밍 할 알렉사 스킬을 얻을 수 있습니다. 내 람다 함수가 올바르게 작동하고 오디오 지시문을 반환합니다. 나는 npm 패키지 alexa-sdk를 사용하고 있습니다.
그러나 응답을 Echo 장치로 보내면 "기술 응답에 오류가 있습니다"라는 일반 오류가 나타납니다. 나는 내 응답 객체를 검증하고 검증하기 위해 알렉사 응답 고리의 일부 유형을 검색했다.
다음은 내 람다 함수 인 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": {}
}