question

aristosv avatar image
aristosv asked

customize question to get the same result

Currently I say “alexa tell youtube to play jazz music” and it plays jazz music from youtube. Is there a way to configure alexa to perform the same task, by saying “alexa play jazz music” ? And can I replace the word “jazz” with a variable for any music genre I ask alexa to play? Thanks

alexa skills kitalexa voice servicealexaalexa smart home
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

Gaetano@Amazon avatar image
Gaetano@Amazon answered

Hi,

Thanks for posting.

"Alexa play jazz music" could generate a 1P response, meaning that she could play jazz music from Amazon Music or Spotify.

However, if you want to have this interaction once your skill is launched, you should create a PlayMusicIntent with a sample utterance like this:

"play {genre} music"

Where {genre} is your custom slot which will act as your "variable". On your backend then, you can fetch the music you want according to the slot value.

Hope it helps.

Kind regards,
Gaetano

10 |5000

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