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);
}
Я пытаюсь вставить аудио, прежде чем alexa говорит в моем умении. Звук находится в пределах 90 секунд. Является ли это способом, по которому я неправильно понимаю звуковой тег или неправильно использую директивы? Заранее спасибо. Любая помощь приветствуетсяAlexa- audio issue
о ssml - пожалуйста, проверьте более строго, например, на вкладке теста slikk в developer.amazon.com (не в aws лямбда-тест!) – nvvetal
Вы включили направление аудиоплеера в настройках навыков амазонки –
Да, но требования были выполнены не нужны аудио-директивы. Я пытался выяснить, как добавить ** аудио-образец **, который должен быть воспроизведен до того, как Alexa заговорила, что не похоже на ** аудио директивы **. Я достиг этого с помощью 'speechOutput = this.t ('WELCOME_MESSAGE') + '';' – Meenashree