Hi,
First off I want to point out that my skill is able to properly play an audio file in a response to a audio intent using AudioPlayer. I learned the hard way that I had to return an empty empty response with shouldEndSession:true when the AudioPlayer.PlaybackStarted. This continues to work for me and has been for sometime.
Tonight I decided to give it a go with the TouchWrapper. I have it all wired up and working. However, when I my skill response with AudioPlayer.Play directive I get a failure callback very similar to the issue I came across when I did not know how to respond to the AudioPlayer.PlaybackStarted is returned:
'error': {'type': 'INVALID_RESPONSE', 'message': 'SpeechletResponse was null'}
For grins I instead had my skill respond without the AudioPlayer.Play directive and it can properly process my request.
Is there something I am doing wrong when responding back to a Alexa.Presentation.APL.UserEvent? Does it always expect a response that is NOT a AudioPlayer.Play? Or am I missing something in the AudioPlayer directive?
Thanks for your help,
Robb
Here it is:
{
"version": "1.0",<br> "sessionAttributes": "{sessionAttributes}",<br> "response": {<br> "outputSpeech": {<br> "type": "SSML",<br> "ssml": "<speak>Here is {title}.</speak> "},<br> "card": {<br> "type": "Standard",<br> "title": "{title}",<br> "text": "Here is reading {title}",<br> "image": {<br> "smallImageUrl": {logo}",<br> "largeImageUrl": "{logo}" }<br> },<br> "reprompt": {<br> "outputSpeech": {<br> "type": "SSML",<br> "ssml": "<speak>What audio would you like to listen to?</speak>"}<br> },<br> "directives": [<br> {<br> "type": "AudioPlayer.Play",<br> "playBehavior": "REPLACE_ALL",<br> "audioItem": {<br> "stream": {<br> "token": "{token}",<br> "url": "{url}",<br> "offsetInMilliseconds": 0}<br> }<br> }<br> ],<br> "shouldEndSession": true}<br>}