question

midtempo avatar image
midtempo asked

AudioPlayer handling Goodbye Intent

Hiya, Using the AudioPlayer and, while the audio stream is playing, if the user says "Alexa Goodbye" (or variant thereof), there will be a standard response ("talk to you later", "bye for now", etc) BUT the audio continues to play. Can't seem to find any way of stopping the audio, can someone enlighten me as to how? Many thanks, Chris

intentsaudioaudioplayer
10 |5000 characters needed characters left characters exceeded

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

LiamDeLee avatar image
LiamDeLee answered

hi there never used the AudioPlayer directive myself but have a look here and i think what you are looking for is the <a href="https://developer.amazon.com/docs/custom-skills/audioplayer-interface-reference.html#stop">AudioPlayer.Stop</a> call to stop your audio streams.

if this did not help much have a look at this github repo here

Here some examples to try out:

this.response.speak(text).audioPlayerStop(); this.emit(':responseReady');

'AMAZON.StopIntent':function () { controller.stop.call(this, this.t('STOP_MSG')) },

Hope this helps you forward

10 |5000 characters needed characters left characters exceeded

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

midtempo avatar image
midtempo answered

Thanks Liam, but the response I'm trying to break into is the standard "Alexa Goodbye", which isn't (afaik) part of the AudioPlayer interface, nor part of the standard built-in intents. C

3 comments
10 |5000 characters needed characters left characters exceeded

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

no problem at all,

If you are in the AudioPlayer interface you don't need to say your name for the basic stuff if i understood it correctly(onlly been reading into this for 10min :)) so the Goodbye is seen as the stopintent no? or am i wrong here?

0 Likes 0 ·

iirc, once the mp3 is playing, the AudioPlayer can respond to start/stop directives, volume control and so forth, however any custom intents need to call the skill name in order to invoke 'em. So, I can put an "Alexa, tell SkillName Goodbye", which triggers a custom GoodbyeIntent (with all the necessary bits). But the standard "Alexa Goodbye" has a response which is handled from outside the skill, and, once invoked, the mp3 then continues to play. Having the skill continue once the user says goodbye, and Alexa responds goodbye, is not ideal :)

0 Likes 0 ·

Hmmmm, seems like a problem that you can't really solve as i see it. Since it is a thing from "native" Alexa i think it is just a bad linking or a link that should be there but is not there at the moment. But i guesse it is better for you to get used to stop instead of goodbye ;) keep me updated if you found a solution or got feedback from Amazon would like to hear the solution.

thx in advance

0 Likes 0 ·