Release Kanzi: Amazon Alexa skill for Kodi - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116) +--- Thread: Release Kanzi: Amazon Alexa skill for Kodi (/showthread.php?tid=254502) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
RE: Amazon Echo skill for Kodi - mcl22 - 2017-05-16 I reported the issue on Github as suggested. For the slots, trimming down entries to 250 each didn't work. 200 didn't work either. It didn't even work when I changed the entries from MUSICALBUMS and MUSICARTISTS. I placed 5 entries for the artists and 300 for the albums. That also didn't work. But the other way with 5 entries for albums and 300 for the artists work. What works is if I trimm all slots down to 100 entries. But then the skill doesn't work realiably any more. For instance "STS" becomes "Faithless" and so on. Of course I could manually add "STS" but I guess I would then run into other similar problems with other artists, albums and so on. The album recognition btw isn't really good with 100 entries for me. RE: Amazon Echo skill for Kodi - fixxolas - 2017-05-16 Hi, i have tried following the guide but Alexa is unable to talkj to Kodi. If i go to "service simulator" and type "play a random movie" and hit 'Ask kodi' i get: There was an error calling the remote endpoint, which returned HTTP 500 : Internal Server Error Is this the URL for the Kodi server? I have checked the kodi.config-file: [DEFAULT] # The Kodi webserver only supports HTTP, but if you've set up a reverse HTTPS # proxy you can change this to https. scheme = http address = nicho.duckdns.org port = 4376 # If using a reverse proxy you might need to add an extra bit to the url # before "jsonrpc" (don't use slashes before or after). subpath = username = secret password = secret RE: Amazon Echo skill for Kodi - fixxolas - 2017-05-16 Got it working with Heroku instead. Much easier. Although, free would be best! Maybe this has passed my by but i'm a little bit lost in what exactly this Skill can do. How do i find what commands are possible to do? RE: Amazon Echo skill for Kodi - mcl22 - 2017-05-16 It seems I've found some wired relation between custom slots and utterances. As I posted before trimming down the amount of entries in the custom slots to 250 didn't solve my problem. Only trimming down to 100 each worked. But with that the skill doesn't work well for me. So I remembered your words that it works for you. So I tried to use all 300 items for the MUSICALBUMS and then change the utterances from german to the english ones. And it worked! Then I thought perhaps there's some kind of character limit or value limit as the german utterances have over 300 more entries. So I trimmed them down to ~ 1000. Didn't work. Then I thought perhaps it's really about the amount of characters because the german sentences are longer. I counted the characters and trimmed the german utterances down to some almost equal value (~44000, the english ones have about 48k). But also that didn't work. So I decided to try 300 utterances, 400, 500. Works! 600 don't. 550 worked. And as that wouldn't be wired enough: I trimmed them down in some sensefull way and came up with 500 utterances. Copy paste - doesn't work!!! If I just take the first 550 lines of my already trimmed (to ca. 1000 entries) german utterances, I can save and it's all ok. But if I take only 500 utterances from my more trimmed german sample, it doesn't. If I take only the entries that are identical in both utterances files (316pcs) I can save. If I only take the rest (184pcs) I can also save. If I combine them and take the whole 500 it doesn't work. I really don't know what to think about that. But I'm also not into programming alexa skills. So perhaps this tells you something or you get an idea what's going on there RE: Amazon Echo skill for Kodi - jingai - 2017-05-16 (2017-05-16, 06:30)msalas71 Wrote: this for @m0ngr31, can you help me, I have been trying for two months to get your Alexa skill kit to work, I have been using a video tutorial from a guy named Paul about your Alexa skill kit. If you have something to do with custom slot generator for Kodi, I keep getting an error Please validate your server information and try again. Paul says my port-forwarding is the problem, but I BOUGHT Some software named port-forwarding network utilities and spoke to two computer programmers they said my port-forwarding is correct. cna you tell me what I am missing here You definitely shouldn't need to buy software to do this; furthermore, who knows what that software is really doing.. You only need to open open and forward the port on your router's configuration interface. edit: Also, please use the official documentation instead of tutorials. We can never guarantee that 3rd-party guides are up-to-date. RE: Amazon Echo skill for Kodi - jingai - 2017-05-16 @mcl22, there is indeed some upper limit to the size/complexity of a skill. Unfortunately, Amazon hasn't really defined (publicly, from what I can tell) what that is. As you're discovering, it doesn't appear to be a pure character limit on the input forms either. For instance, you can easily make this fail by adding a few more slot references to intents. In the form, this amounts to just a few chacracters, but I'm assuming they're generating a code blob from this input and probably making a copy of the slot each time it's referenced. (2017-05-16, 14:13)mcl22 Wrote: What works is if I trimm all slots down to 100 entries. But then the skill doesn't work realiably any more. For instance "STS" becomes "Faithless" and so on. Of course I could manually add "STS" but I guess I would then run into other similar problems with other artists, albums and so on. Custom slots will only allow the literal, unmatched string through if the size of the slot exceeds a certain number. Again, Amazon won't tell us precisely what this number is, but it appears to be ~200 items. If the slot contains this magic number of items, it will convert to what Amazon calls a "generic slot." This allows unmatched strings to be passed through to the skill literally. In the context of our skill, the reason it feels unreliable to you without 'generic slots' is that we do our own fuzzy matching in the skill. This code will never execute if Amazon doesn't pass the literal string through, so you're getting matching only on the items you've put into your slot. (2017-05-16, 14:13)mcl22 Wrote: So I remembered your words that it works for you. So I tried to use all 300 items for the MUSICALBUMS and then change the utterances from german to the english ones. And it worked! This is one of the bigger issues with maintaining translations for Alexa skills. The translators need to have a pretty decent understanding of the rest of the code in order to avoid issues like this.. or the primary authors need to have an understanding of the language in question (German, here). From my own experience, I don't believe the issue here is the raw character count in the utterances.. as you've discovered: (2017-05-16, 14:13)mcl22 Wrote: Then I thought perhaps there's some kind of character limit or value limit as the german utterances have over 300 more entries. So I trimmed them down to ~ 1000. Didn't work. Welcome to many of my evenings fighting the web interface for this for hours on end.. Unfortunately, I don't really have an answer for you, though. There are two things that come to mind, 1) For German, each character is twice as big as it is for English. The English version of ASK only supports ASCII, whereas for German it supports UTF-8, which stores each character in two bytes. This effectively makes the storage size for utterances (and maybe other things, perhaps indirectly) larger by default for German, 2) There might be a collision in the German utterances; that is, two (or more) unrelated phrases that are not unique enough to be distinguished by ASK and refer to two different slots. #2 is likely it considering the other testing you've done trimming the utterances down. Unfortunately, this means a ton of trial-and-error testing for me as I personally know absolutely no German.. and more annoyingly, for this particular problem, you have to wait for the stupid interface to time out to continue on :/ If you're up for it, one thing I'd like you to try is to cut every utterance that refers to a slot (you'll see a string within curly braces, those are slot references) down to one utterance. For example: Code: AddonExecute führe add on {Addon} aus becomes something like: Code: AddonExecute führe add on {Addon} aus If you need me to generate a file for you like this, just let me know. But the idea is, if this works, it would then be a matter of adding the additional lines back in section-by-section until it fails again, which would hopefully help narrow down the conflict. RE: Amazon Echo skill for Kodi - mcl22 - 2017-05-16 It seems we're on the right way. I cut about 300 lines and it saved successfully. The ugly part comes now when trying to paste them in again, save and wait When I now try to play 2Pac, Alexa in one case played "rat pack", in the other she couldn't find "tupac". "2 unlimited" on the other hand worked. And I tried to make her play the album "bat out of hell II" by meat loaf by asking her to "play the album bat out of hell 2 by meat loaf". Of course T did it in german and once I tried it with the german "zwei" for 2 and once with "two". In the first case she told me that she couldn't find an album "bat out of hell" by "2 unlimited". But the log doesn't have an entry for that. In the second case she told me that she couldn't find an album "bat out of hell" from "talco". This is documented in the server logs. In the third case she ended up playing "bat out of hell" but not the 2nd one And for my "Sex Sex Sex" album by J.B.O. the following happend: I asked her to "play the album Sex ... by JBO" and she answered that she couldn't find the album "seal" by "J.B.O.". Then I asked her to "play the album Sex ..." (without artist). her answer "I couldn't find the album sechs sechs sechs". This is what the logs say. And sechs is the german word for six. But indeed the pronounciation is almost the same RE: Amazon Echo skill for Kodi - bill_orange - 2017-05-16 I have the Kodi skill up and running nicely using Zappa in the lambda site. I was able to install it with minimal confusion. I have a question on updating resulting from my complete unfamiliarity with the virtual environment. In your update instructions: "If you are already using Zappa, browse to the application directory in your terminal, make sure that your virtual environment is enabled and run `pip install -r requirements.txt`, `git pull origin master`, and `zappa update dev`." When you say "make sure that you virtual environment is running" , I am not sure what to do. Do you mean run ( I am in windows) : venv\Scripts\activate.bat In other words is activating the virtual environment have the same meaning as running it or does something else need to be done. RE: Amazon Echo skill for Kodi - jingai - 2017-05-16 @bill_orange, yes, it means to activate it. RE: Amazon Echo skill for Kodi - jingai - 2017-05-16 (2017-05-16, 18:45)mcl22 Wrote: When I now try to play 2Pac, Alexa in one case played "rat pack", in the other she couldn't find "tupac". "2 unlimited" on the other hand worked. Without a curated database, it's impossible for this to ever be perfect for every single artist name. But, as you can see, it does indeed at least try (2017-05-16, 18:45)mcl22 Wrote: And I tried to make her play the album "bat out of hell II" by meat loaf by asking her to "play the album bat out of hell 2 by meat loaf". Of course T did it in german and once I tried it with the german "zwei" for 2 and once with "two". This means Amazon intercepted it and Alexa tried to process the request on her own. This can happen on occasion and we don't really have any control over what Amazon decides here. (2017-05-16, 18:45)mcl22 Wrote: In the second case she told me that she couldn't find an album "bat out of hell" from "talco". This is documented in the server logs. Could you post the transcription of your requests? Preferably for both of these. How is the album listed in the Kodi library? Is it, exactly, "Bat out of Hell 2"? Or does it use a roman numeral to represent 2? Is there a subtitle attached to the title, such as, "Bat Out of Hell 2: Back Into Hell"? If there is a subtitle on it, you'll need to speak the entire title (or at least, most of it). This is because when you say just, "bat out of hell 2", it will more strongly match to "bat out of hell" than "bat out of hell 2: back into hell". Again, without a curated database of artists, albums, songs, etc.. we can't do much better than this. (2017-05-16, 18:45)mcl22 Wrote: And for my "Sex Sex Sex" album by J.B.O. the following happend: Alexa simply misheard you in this case. In your Alexa App, you can check the history to see what she heard. The skill can't really 'correct' these sorts of issues, unless the result is somewhere close to your intention. (2017-05-16, 18:45)mcl22 Wrote: Then I asked her to "play the album Sex ..." (without artist). her answer "I couldn't find the album sechs sechs sechs". This is what the logs say. And sechs is the german word for six. But indeed the pronounciation is almost the same "Sechs sechs sechs" definitely might not fuzzy match to "sex sex sex". They sound similar to you and I, but they're probably not close enough for our matching. The summary here is.. I think we're matching generally about as well as we can without some external database to help us translate the sorts of names musicians tend to use. There are databases out there that do this (musicbrainz and the like), but I'm rather hoping Amazon opens up their own matching to the built-in intents since they clearly already do this for their own music service. If you could continue adding utterances back in section-by-section (in alphabetical order, preferably), hopefully we can identify at least one side of the conflict. Then it would be a matter of drilling further into the ones you already added, taking them back out until it saves again. RE: Amazon Echo skill for Kodi - mcl22 - 2017-05-17 I#ve done a lot of try & error and now have a list of 1183 items for the german utterances. But there are still about 230 cut out. Now it's getting in the region where I had to really try it line by line. As you know this is very time intensive and boring The problem I have is that I don't really understand what in this case makes a phrase unique (enough). I could understand that something like "what new albums do we have" and "what new movies do we have" could be difficult. But that doesn't seem to be the case as "WhatNewAlbums welche neuen Alben fertig sind", "WhatNewMovies welche neuen Filme fertig sind" and "WhatNewShows welche neuen Serien fertig sind" are all accepted. On the other hand if I only add the utterance "WhatNewMovies ob du einen neuen {Genre} Film hast" it fails. The only other utterances that include an "ob" (german for if) are also for the WhatNewMovies type and a single one "NewShowInquiry ob wir neue Folgen von {Show} haben" which in my opinion differs a lot from the other one so Alexa should be able to distinguish between them. And one more thing. Actually I don't know why I did this yesterday but I only cut utterances with curly braces as suggested. Except for the WhatNewAlbums part. There I cut all of them except one. And now I can't add them back, too. That's 59 utterances all without any variable or whatever it's called in this context. But they also don't work. This again as stated before, I would understand if "what new albums ..." and "what new movies ..." and so on wouldn't work either. But it does. I'm only trying to get it so I could choose the utterances I try in a smarter way. I thought I am a pretty logical person but in this case it seems to me that I oversee something For bat out of hell II you were right. Asking her for "bat out of hell 2: back into hell" worked. One last thing. I don't know if I should post it here or on github. Would it be possible to add music genres? I already asked that some time ago and you told me that you use playlists instead. This is what I did, too. But I do have one problem especially if don't know the exact name of an album. I do have a lot of christmas songs from famous artists like boney m. christina aguilera, céline dion and so on. What works pretty well for me is asking Alexa to play some music by .... But if choosing an artist who also made some christmas songs kodi of course also plays them. And that's usually not the music I wanna listen to when asking for boney m. for instance So the possibility to say something like "play some dance music by boney m." or "some pop by christina aguilera" would be great. And in the christmas time it would also be a cool feature to ask for some christmas music by christina aguilera. RE: Amazon Echo skill for Kodi - jingai - 2017-05-17 (2017-05-17, 12:02)mcl22 Wrote: I#ve done a lot of try & error and now have a list of 1183 items for the german utterances. But there are still about 230 cut out. Now it's getting in the region where I had to really try it line by line. As you know this is very time intensive and boring But I suspect the problem is a collision between two or more intents that reference slots (the ones with curly braces). The idea was that you would cull these down to one line for each of these intents, leaving the rest of the utterances intact. If that saves (and you said it did), you would then, alphabetically, add each of those sections in one-by-one (not line-by-line -- you can add the whole section for that intent) until it failed again. When it fails, you should let me know which section you were in. From there, we could leave in the section that made it fail, but start removing the ones before it until it succeeds again. The above would narrow down which two sections are colliding, assuming my hypothesis is correct. (2017-05-17, 12:02)mcl22 Wrote: I could understand that something like "what new albums do we have" and "what new movies do we have" could be difficult. But that doesn't seem to be the case as "WhatNewAlbums welche neuen Alben fertig sind", "WhatNewMovies welche neuen Filme fertig sind" and "WhatNewShows welche neuen Serien fertig sind" are all accepted. Nah, I don't suspect that these are causing an issue. Alexa can deal with a lot of overlap in utterances that don't reference slots. The kind of failure that I'd suspect for malformed/colliding utterances of this type is just that she would interpret your request to mean something else. Those that do reference slots, though, appear to be treated somewhat specially in my experience, and I know for certain that collisions in those can cause the failure mode you're seeing. (2017-05-17, 12:02)mcl22 Wrote: And one more thing. Actually I don't know why I did this yesterday but I only cut utterances with curly braces as suggested. Except for the WhatNewAlbums part. There I cut all of them except one. And now I can't add them back, too. That's 59 utterances all without any variable or whatever it's called in this context. But they also don't work. Let's try to do one thing at a time here.. we can try other things if my suggestion above doesn't get us anywhere. (2017-05-17, 12:02)mcl22 Wrote: One last thing. I don't know if I should post it here or on github. Would it be possible to add music genres? I already asked that some time ago and you told me that you use playlists instead. This is what I did, too. But I do have one problem especially if don't know the exact name of an album. I do have a lot of christmas songs from famous artists like boney m. christina aguilera, céline dion and so on. I understand that you want it, and I do too. We didn't close your Github Issue, which is an indication that it will be done at some point. But as with all OSS, it boils down to a programmer finding both the time and interest to implement it, as well as the project maintainers finding the time to ensure the code works (i.e., testing). For the sake of documenting the specifics of your request, you should post your comment on your Github Issue, so when it comes time to implement it, we can be sure to specifically add things like, "play some dance music by boney m." RE: Amazon Echo skill for Kodi - mcl22 - 2017-05-17 Ok, it fails for the first time when it comes to ListenToSong. In the german utterances there are the following lines: ListenToSong spiel das Lied {Song} ListenToSong spiel das Lied {Song} von {Artist} ListenToSong spiel den Song {Song} ListenToSong spiel den Song {Song} von {Artist} ListenToSong spiele das Lied {Song} ListenToSong spiele das Lied {Song} von {Artist} ListenToSong spiele den Song {Song} ListenToSong spiele den Song {Song} von {Artist} With the first two lines it saves. Adding the rest fails. What should I do now? Btw I of course added them section by section before. But when one section failed I removed it and took the next one and so on. That's how I made the list with 1183 entries. I didn't now that we have to go back once it fails and remove the prior items RE: Amazon Echo skill for Kodi - v0lcano - 2017-05-17 (2017-05-15, 02:56)jingai Wrote: @v0lcano and any others trying to use Heroku atm: @jingai @m0ngr31 i just wanted to say thank you for fixing the Heroku app a couple of days ago, it's working perfectly now! RE: Amazon Echo skill for Kodi - jingai - 2017-05-17 The idea was to leave that entire section (ListenToSong) in, but start removing the prior sections you added back in (except for the first line) until it saves again. But.. before we do that.. is there perhaps something you notice in common with the ones you ended up removing in your list of 1183 entries? Like do they all contain "spiel" or "spiele" by chance? Are they all Listen* intents? |