question

BenRolfe avatar image
BenRolfe asked

Controlling volume during long audio file

I've built a Skill that successfully plays a long audio file (~ 30 minutes). When the user (while the audio is playing) says "Alexa, volume up", it gets passed to my "AMAZON.FallbackIntent" handler.

Shouldn't Alexa handle the volume for me? Or is there a way to control volume using the Node SDK?

alexanode_jsnodejs
10 |5000

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

Andy Whitworth avatar image
Andy Whitworth answered

Presumably you're using the Amazon AudioPlayer interface to play your audio ? If so then the volume adjustment request should be handled by Amazon directly and have nothing to do with your skill code. If however your skill session is still active and you're playing the audio via SSML (unlikely as SSML audio can only be 240s max) then the volume up speech may be determined to be an (unmodelled) skill intent.

10 |5000

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

BenRolfe avatar image
BenRolfe answered

Yeah, I'm using the Amazon AudioPlayer interface - but Amazon fails to handle it.

Should I be using `.withShouldEndSession()` in the response?

1 comment
10 |5000

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

Shouldn't have to. Have you had a look at the Amazon supplied audio player example ?

https://github.com/alexa/skill-sample-nodejs-audio-player/blob/mainline/multiple-streams/lambda/src/index.js

I've written several audioplayer skills and with all of them, any volume request is handled by Amazon natively. As a developer you don't have the means to control the audio volume anyway. Have you tried "Alexa, volume n" ? (where n is 1-10)

And check to see what Amazon thought you had said: https://alexa.amazon.co.uk/spa/index.html#settings/dialogs


0 Likes 0 ·