Stream Block Automatically Stop?

I want to stream audio, but I want it to automatically stop and end the session once the audio is complete. Is this possible? At the same time, I want the user to be able to say “next” to listen to a different audio.

just one idea

after the last audio block, put speak block and ask user “wanna listen from the begining?” and choice block with Yes/No.
then

  • after the last audio block, if user doesn’t say anything, the skill ends.
  • during the last audio block, if user say “Next”, alexa ask above and user say “Yes”, audio will plays from the beginning again.

Super cool idea! I wish there was a way to automatically stop though, since I want the experience to feel seamless. If I don’t find a way, I will definitely implement your suggestion. Thanks!!

Actually, if you don’t put any blocks after the last stream block, audio will stop. but you wanna implement “next” for the last audio too and go back to the beginning, right? That’s why I put them :smile:

Wait, can you explain that different? I don’t understand. I want to implement “next”, but I want the sound to stop after it plays one…

As I tested, if stream block flow is looping, it will keep playng each stream till the end, then back to the first again when user say nothing. also if user say “next”, just same.

(I simplified a little bit)

If you want stop, just don’t connect any blocks to “next” of one of stream blocks, it will exit.

but Amazon says that you have to say something even if you don’t wanna go “next”. So you should put speak block to say something like “This is the end of audio” after the last, at least. This block is called only when user say “next” during play stream3.


I don’t think that’s the case…see even when I don’t say next, it will just go into Goodbye.

really? I will test it later.

did you get the same results as me?

tested on my echo device.

  • If I say nothing, 1st speak block is spoken, audio is played, ends. the last speak block is NOT spoken.
  • If I say “next”, 1st speak block is spoken, audio is played, and the last speak block is spoken.

one thing to remeber. when testing a skill with streaming block, you should test on Echo device. test on ADC does not support streaming skill and also test on VF does not completely simulate real echo device and act differently.

Ok, helpful. I will try on my echo device.