For context, I am building a skill that involves recorded narrations as audio streams.
- For one of the narrations, a question will be posed to the user (recorded as part of the narrations)
- The user's intent, captured using
this.response.listen()
, will determine the next set of narration to play
My issue is the following - as part of the Skill requires audio playback, I am using the AudioPlayerInterfaces
. I encounter the error at the following part (see code below with comment):
var audioEventHandlers = {
'PlaybackStarted': function() {
this.emit(':responseReady');
},
'PlaybackFinished': function() {
if (currentStream.keyName === 'intro') {
this.response.listen(); //<-- this line causes the error
}
this.emit(':responseReady');
}, //additional handler code omitted as not relevant
Specifically, the error triggered by this.response.listen()
is:
"error": {
"type": "INVALID_RESPONSE",
"message": "The following directives are not supported: Response may not contain an reprompt,Response may not have shouldEndSession set to false"
},
I have seen other Skills utilizes recordings, followed by a .listen()
prompt, so I know that this is technically feasible. I was wondering how I should be approaching this?
Thanks!