declension / squeeze-alexa

Squeezebox integration for Amazon Alexa
GNU General Public License v3.0
59 stars 20 forks source link

SetVolumeIntent missing #35

Closed DFranzen closed 6 years ago

DFranzen commented 6 years ago

The utterances and the Intent definition for SetVolumeIntent are available in the code, but the code does not handle this intent. Upon invocation Alexa simply say's "Sorry, I don't know how to process SetVolumeIntent". This feature can be easily implemented similar to IncreaseVolumeIntent. It needs:

  1. a new routine in server.py similar to change_volume, which passes the new volume value without any sign to the "mixer volume" command.
  2. a new handler in main.py: which performs a boundary check and scales the value to the range 0-100 (as accepted by LMS).I propose a range 0-10 as accepted volume values, since that is the same as Alexa accepts for her own volume.
  3. the definition of SetVolumeIntent in intents.py
  4. new testcases
declension commented 6 years ago

Thanks @DFranzen. See also #12 (think I got the wrong one before)

declension commented 6 years ago

This is definitely a good idea. The only thing I'm not so sure about it 0-10 (but I now understand why - thanks). For me that's not quite enough granularity, especially if you have big sound systems..

However I'm not the intended audience here so what might be a great compromise is go with this and see how it goes, and then maybe:

DFranzen commented 6 years ago

Yes the additional intent for percent is a good idea. I have seen this with other skills definitively in the Kodi skill I am using. So it is consistent with other user experience. The idea to use 0-10 as Alexa scale and 11-100 as percent scale I don't like as it introduces so called mode errors, where the user does not see the mode he is operating in at the moment. A failed interaction scenario would be if a user sets the vol to 11% and then wants to decrease to 10%. In that case the volume would turn very loud out of a sudden.

-------- Ursprüngliche Nachricht -------- Von: Nick Boultbee notifications@github.com Datum: 23.02.18 06:41 (GMT+00:00) An: declension/squeeze-alexa squeeze-alexa@noreply.github.com Cc: Daniel Franzen daniel.franzen.blubb@gmail.com, Mention mention@noreply.github.com Betreff: Re: [declension/squeeze-alexa] SetVolumeIntent missing (#35)

This is definitely a good idea. The only thing I'm not so sure about it 0-10 (but I now understand why - thanks). For me that's not quite enough granularity, especially if you have big sound systems.. However I'm not the intended audience here so what might be a great compromise is go with this and see how it goes, and then maybe:

add another intent like Set volume to NUMBER percent (and accept 0 - 100) or even just assume that nobody wants to set volume to <10% so treat anything from 1-9 as the above, and everything bigger as a percentage, but this could be risky...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/declension/squeeze-alexa","title":"declension/squeeze-alexa","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/declension/squeeze-alexa"}},"updates":{"snippets":[{"icon":"PERSON","message":"@declension in #35: This is definitely a good idea. The only thing I'm not so sure about it 0-10 (but I now understand why - thanks). For me that's not quite enough granularity, especially if you have big sound systems..\r\n\r\nHowever I'm not the intended audience here so what might be a great compromise is go with this and see how it goes, and then maybe:\r\n add another intent like Set volume to NUMBER percent (and accept 0 - 100)\r\n or even just assume that nobody wants to set volume to \u003c10% so treat anything from 1-9 as the above, and everything bigger as a percentage, but this could be risky..."}],"action":{"name":"View Issue","url":"https://github.com/declension/squeeze-alexa/issues/35#issuecomment-367924236"}}}

declension commented 6 years ago

Cool, agreed - @DFranzen if you have a PR for this please send it over. If not I'll have a look when I get a bit more time...