I want to be able to do the following:
- make alexa say something
- play audio file
- make alexa say something else
I have tried the following code which does not work:
const IntentHandler = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === "IntentRequest" &&
handlerInput.requestEnvelope.request.intent.name === "MyIntent";
},
handle(handlerInput) {
return handlerInput.responseBuilder
.speak("Say something")
.addAudioPlayerPlayDirective('REPLACE_ALL', audioFile, 'token', 0)
.speak("Say something else")
.getResponse();
}
}
The result of the code above is this:
- "Say something else"
- audioFile plays
How can I achieve this?