var Response = require('alexa-response');
//first intent
LaunchRequest:function(){
//Type 1 gives an error saying the "response is not valid" when tested in the developers console.
//the Response here is an npm library
Response.directives(
AudioPlayer.play({ url: 'https://s3.amazonaws.com/sounds226/boom.mp3' }),
AudioPlayer.enqueue({ url: 'https://s3.amazonaws.com/sounds226/boom.mp3' } ) .build();
//Type 2 : gives an error when tested on echosim.io saying that the response is not valid
speechOutput = this.t('WELCOME_MESSAGE'); this.response.audioPlayerPlay("REPLACE_ALL",audioData[1].url).speak(speechOutput);
this.emit(':responseReady');
//Type 3: tried to insert the audio tag within the speech response, error again
speechOutput = {
speech: "<speak>" +message+ "<audio src = 'https://s3.amazonaws.com/sounds226/boom.mp3'/></speak>",
type : 'SSML'
};
response.ask(speechOutput);
}
アレクサが私のスキルを話す前に、オーディオを挿入しようとしています。音声は90秒以内です。それは間違った方法でオーディオタグを間違って理解しているか、ディレクティブを使用しているのでしょうか?前もって感謝します。アレクサオーディオの問題
と明確な情報がある:
LaunchRequestまたはIntentRequestに応答するとき、あなたの応答は、両方のAudioPlayerディレクティブと標準を含むことができ、すべてのヘルプはここで
- (!ないのAWSラムダテスト中)developer.amazon.comでslikkテスト]タブでは、たとえば、より厳密にチェックしてください – nvvetal
あなたがスキルにセットアップ –
はいをアマゾンであなたがオーディオプレーヤーの方向を有効にしているが、必要条件ではなかったですオーディオ指令は必要ありません。私は**オーディオサンプル**を追加する方法を見つけようとしていましたが、これは**オーディオディレクティブ**と似ていないAlexaスポークの前に再生する必要があります**。私は 'speechOutput = this.t( 'WELCOME_MESSAGE')+ ''によって達成しました。 – Meenashree