m0ngr31 / kanzi

Alexa skill for controlling Kodi
https://lexigr.am
MIT License
427 stars 149 forks source link

Add example utterances to AMAZON.HelpIntent. #216

Closed jingai closed 7 years ago

jingai commented 7 years ago

This expands the Help response to include random example utterances the user can try.

The spoken response includes one random utterance and another for the reprompt. The same reprompt is used for ask.launch (skill opened with no Intent requested, as in, open kodi).

The Card presented in the Alexa app provides 5 randomly-chosen utterances.

The example utterances are chosen from the speech_assets/SampleUtterances.LANG.txt file. A new file sample_slotvals.LANG.txt was created to fill slot references with something to make it sound more natural than something like insert title here.

Needs testing for Heroku deployments

jingai commented 7 years ago

There are several things in this PR that require German translations:

help_short: "What would you like to do? Try something like, {{ example }}."

help_text: "Kodi-Alexa allows you to fully control one or more Kodi installations with your voice. Here are some examples of things you can say:\n\n{{ examples }}\nFor a complete list of supported requests, please see the README file on Github (https://github.com/m0ngr31/kodi-alexa/README.md)."



Ping @mcl22 and @ausweider :)
jingai commented 7 years ago

@mcl22 and @ausweider, I forgot to mention.. the values for these in sample_slotvals.de.txt should all be related:

Artist
Album
MusicGenre
Song
MusicVideoGenre
MusicVideo

That is, they should ideally all be from the same album and by the same artist, otherwise you could get some weird suggestions like:

Play Death Metal music by The Beetles
Play Barbie Girl by Metallica

;)

mcl22 commented 7 years ago

Ok, here we go. I hope I didn't miss anything :)

template strings: help: "Du kannst mich fragen, ob es neue Serien gibt, mich bitten einen Film, eine Serie oder die Musik eines Interpreten abzuspielen oder die Wiedergabe von Medien zu steuern und vieles mehr. Zum Beispiel {{ example }}. Ich habe dir weitere Beispiele an deine Alexa App geschickt." help_short: "Was möchtest du tun? Probiere etwas wie {{ example }}."" help_text: "Kodi-Alexa ermöglicht es dir eine oder mehrere Kodi Installtionen mit deiner Stimme zu steuern. Hier sind einige Beispiele, die du sagen kannst:\n\n{{ example }}\nFür eine komplette Liste der unterstützten Kommandos, lese bitte die README Datei auf Github (https://github.com/m0ngr31/kodi-alexa/README.md)."

utterances: AMAZON.HelpIntent (/nach) was ich es fragen kann AMAZON.HelpIntent was es (/alles) kann

sample slotvals: Addon YouTube MovieGenre Komödie Movie Männertag Artist Helene Fischer Album Farbenspiel MusicGenre Schlager AudioPlaylist Partymusik Song Atemlos Show Farscape VideoPlaylist HD-Videos ShowGenre Science-Fiction MusicVideoGenre Pop MusicVideo Die Hölle morgen früh Volume Fünfundsiebzig Season zwei Episode acht ForwardDur eine Minute BackwardDur 30 Sekunden

jingai commented 7 years ago

Thanks again @mcl22 :)

digiltd commented 7 years ago

Just a thought, but given the double meaning of the word "alternative" is it going to be a little confusing when used in context?

ListenToGenre listen to alternative genre ListenToGenre listen to alternative music ListenToGenre listen to alternative songs

ListenToArtist listen to alternative artist Sia ListenToArtist listen to alternative music by Sia ListenToArtist play alternative artist Sia ListenToArtist play alternative music by Sia

jingai commented 7 years ago

It doesn't sound weird to me, but honestly it doesn't matter to me either what it is so long as it fits, so I'll change it :)

jingai commented 7 years ago

Have you tried this PR with AWS? If no one gets around to it, I can do it, but it'd save me some trouble.

digiltd commented 7 years ago

It works.

image

Could quotes be added around each command to help with formatting?

I'm all for providing the user with help, but the randomness of the examples might not be that helpful, especially for a beginner.

Thoughts on using a curated list of the basics to randomly pick from?

jingai commented 7 years ago

Yes, I can add quotes around them. I actually hadn't looked at it using the mobile app.

As for the list of things, I prefer a random set because it shows variations. Certain intents can be excluded, however. I've already excluded the PlayerZoom intents and had considered excluding the navigation commands because things like "right" without any context are kind of confusing, particularly in the spoken response.

edit: there should be newlines there too.. Amazon says they can be included, and they show up right in a web browser.. not sure why they're not there on mobile.

jingai commented 7 years ago

Had to insert a non-breaking space in between two newlines to get it to show an empty line on the mobile app.. kinda weird, but it works. Lemme know if that looks better.

jingai commented 7 years ago

As an aside, it'd be nice if Amazon allowed hypertext links, though I can understand why they don't (security risk).

digiltd commented 7 years ago

image

Peachy.

Maybe just say "for a complete list please see the GitHub repo"

jingai commented 7 years ago

Thoughts on including the navigation/system commands? Particularly these:

Home (/navigate/go) home
Back (/navigate/go) back
Up (/navigate/go) up
Down (/navigate/go) down
Right (/navigate/go) right
Left (/navigate/go) left
PageUp (/navigate/go) page up
PageDown (/navigate/go) page down
PageDown show more
Select select
Menu (/open/context) menu
Fullscreen (/toggle) (fullscreen/visualizer)
Hibernate (hibernate/deep sleep) (/system)
Reboot reboot (/system)
Shutdown shut down (/system)
Suspend (suspend/sleep) (/system)
Suspend put system to sleep
Suspend go to sleep
m0ngr31 commented 7 years ago

That's fine with me

jingai commented 7 years ago

Meaning you'd prefer to include or exclude them?

m0ngr31 commented 7 years ago

Sorry, I think it's fine to include those.

jingai commented 7 years ago

Ok, all that needs to be done I think then is to test on Heroku.

m0ngr31 commented 7 years ago

I'll give it a test real quick

m0ngr31 commented 7 years ago

Works great on Heroku

jingai commented 7 years ago

Awesome, thanks for checking.