APMDev avatar image
APMDev asked

Intent getting sent to Audio skill before user finishes speaking - even before invocation name

Ok so this is a very bizarre problem. I have an audio streaming skill. It's on v1 of the node SDK. When the skill is streaming / has control of the audio player, if I say "Alexa ..." it immediately sends a blank intent to my skill, even before I can finish issuing the command.

The experience is that I'll still be saying the command, but the skill is already responding with its "Unhandled" handler that the V1 node SDK falls back to. Even before I finish saying the invocation name - meaning it will interfere with literally any other skill a user tries to invoke. It wasn't doing this before and I'm not sure when or why this started happening, but the skill is in production.

This doesn't happen at all if the skill doesn't have control of the audio player (CORRECTION: it doesn't happen if the skill isn't currently playing audio, even if it does have control of the player).

I.e., I can say "Alexa, ask [my skill] to [do utterance thing]" and it works just fine if it's not playing audio. This problem only happens when it's streaming audio, which is a significant problem given that that's the central purpose of the skill.

alexa skills kitintentssdkaudioplayernodejs
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

newuser-702541ed-b9f3-4f92-afbc-16ab2313821e avatar image
newuser-702541ed-b9f3-4f92-afbc-16ab2313821e answered

Hi APM Dev!

What you're getting is probably the AudioPlayer.PlaybackStopped event. When you said "Alexa" it stopped the playback, so it could better hear what you were saying. It sends you a Stopped event so you can handle any tracking you need to.

Since you're on v1 of the node sdk, I'll let you in on a secret debugging weapon of mine:

The first line line in every one of my skills is:

console.log(JSON.stringify(event, null, 2));

Assuming you're using lambda, this causes every event to be logged to cloudwatch in a readable format. Then you can view that and see what is coming through, or throw it in a file and simulate using node-lambda.


10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.