My live skill, which has a mix of ssml audio and Alexa speeches, has begun to malfunction without any change to the skill code.
In detail, when the skill returns this speech:
<speak><audio src="CLOUDFRONT_PATH/0-selection-B.mp3"/> <audio src="CLOUDFRONT_PATH/1-story-before-action.mp3"/> Chiedi alle carte perché dipingono le rose di rosso, dicendo: perché dipingete le rose?</speak>
the Alexa speech (Chiedi alle carte...) is no more played (as you can see in the attached video, the blue ring flashes a bit and then turns off).
But when the skill returns this:
<speak><audio src="CLOUDFRONT_PATH/0-selection-A.mp3"/> <audio src="CLOUDFRONT_PATH/1-story-before-action.mp3"/> Chiedi alle carte perché dipingono le rose di rosso, dicendo: perché dipingete le rose?</speak>
which is the same as above except for the first audio file, the final speech is played correctly.
Ok, easy, it's just a matter of the first audio file. After three days of intense analysis, unfortunately this is not so simple. So here's a summary of my analysis:
- The only difference between the two responses is the name of the first audio file. I compared the whole response (not only the
outputSpeechobject) with a diff tool and they are exactly the same, no doubt about this.
- Both audio files are 22050Hz 48kbps. I even resampled them to 16000Hz 48kbps, no luck.
- selection-A.mp3 (no bug) is 28 seconds long, selection-B.mp3 (bug) is 47 seconds long, second file (common to both responses) is 134 seconds long. In both cases, we are well below the "240 seconds / max 5 audio tags" limits.
- I tried to enclose the Alexa speech in a paragraph tag, in a voice tag, I have added spaces, removed spaces, changed the quotes type, no luck.
- All audio files are publicly available, they are played correctly (bug is in the Alexa speech at the end), so this is not a matter of permissions.
- I tried all available
playBehavior(ENQUEUE/REPLACE_ALL/REPLACE_ENQUEUED) for the
outputSpeech, no luck.
- All devices (Echo/Dot/Show/Spot) are affected, with and without screen.
As this bug has appeared without any change to the skill code, this is for sure a device-related bug. I have no more ideas, and my live skill is malfunctioning, so any help would be highly appreciated.