Build an open future with us.

Invest in Mycroft and become a community partner.

Updating Skills?


#1

Howdy all, googling around didn’t answer this, but there might be a place to read the answer (if so, apologies!).
I installed a skill that I wrote via the web GUI, but set it up wrong. I installed the skill, but it didn’t work…I think I fixed it, but I can’t figure out how to update it without consoling in to do so manually. Mycroft can’t find the module by the name that I (think) I named it when I use the voice-based uninstall.


#2

Hi there @Pair-o-twos, happy to help, I just need a little more information :slight_smile:

  • Can you provide a directory listing of your * /opt/mycroft/skills directory? In particular I’m looking at directory permissions, so using ls -las would be helpful.

  • And perhaps a link to your Skill’s code if it’s on GitHub?


#3

Thanks Kathy! I was wondering if I could do it from a web gui since the voice command didn’t work; guess not!

I’m remoted into my Mark 1, wiped out the offending module, and loaded the updated one ( https://github.com/Siltstorm/storytime-skill ). The keyword trigger isn’t going off. I’m just brute forcing this at this point, trying to essentially do a clone-and-replace-keywords on a basic skill snippet (the coin flip one). Since I didn’t write it from scratch, I’m probably missing something that would make a lot of sense if I went from the ground-up…but I expected this to be a quick and easy proof of concept :smiley:
I can get the module to load into my Mark 1 via web or msm, but the key phrase (“tell me a story”) doesn’t work (response: “Huh? I don’t understand”).

All this is tangential to the original question, but it’s late, and I figured I’d leave this at my stopping point, at the least as a self-reminder. is there a skill module template somewhere that I’m missing? The code in the coin flip one was decently verbosely commented, and it has a pretty basic function, which is why I chose it.

If you’re curious, have a go, tell me where I’m all messed up–but if you’re otherwise busy, don’t worry about it. Thanks again!


#4

Hi there @Pair-o-twos, I took a good look at this one.

The vocab phrase Tell me ... is used by a Fallback Skill, and the Intent Parser didn’t know how to handle Tell me a story. So I changed the vocab file to be story time and tried to see if that worked. It didn’t. So I looked at the logs to see what the Utterance from speech to text was returning, and it was returning a single word - storytime. You can see my logs below. So if you change the vocab word to be storytime, then it will work for you :slight_smile:

pi@mark_1:/var/log $ tail -f mycroft-skills.log | grep -i Utterance
13:32:03.142 - SKILLS - DEBUG - {"data": {"session": "30db66ab-28ec-4f0f-b50e-3a8d8819830e", "utterance": "hey mycroft"}, "type": "recognizer_loop:wakeword", "context": null}
13:32:07.438 - SKILLS - DEBUG - {"data": {"session": "30db66ab-28ec-4f0f-b50e-3a8d8819830e", "lang": "en-US", "utterances": ["tell me a story"]}, "type": "recognizer_loop:utterance", "context": {"ident": "1526477523.1242428-1083544129", "client_name": "mycroft_listener"}}
13:32:07.460 - SKILLS - DEBUG - {"context": {"ident": "1526477523.1242428-1083544129", "client_name": "mycroft_listener"}, "type": "intent_failure", "data": {"utterance": "tell me a story", "lang": "en-US"}}
13:32:23.780 - SKILLS - DEBUG - {"context": {"ident": "1526477523.1242428-1083544129", "client_name": "mycroft_listener"}, "type": "speak", "data": {"utterance": "Huh, I don't understand.", "expect_response": false}}
13:34:38.607 - SKILLS - DEBUG - {"data": {"session": "30db66ab-28ec-4f0f-b50e-3a8d8819830e", "utterance": "hey mycroft"}, "type": "recognizer_loop:wakeword", "context": null}
13:34:44.394 - SKILLS - DEBUG - {"data": {"session": "30db66ab-28ec-4f0f-b50e-3a8d8819830e", "lang": "en-US", "utterances": ["tell me a story"]}, "type": "recognizer_loop:utterance", "context": {"ident": "1526477678.5946262-1083544129", "client_name": "mycroft_listener"}}
13:34:44.420 - SKILLS - DEBUG - {"context": {"ident": "1526477678.5946262-1083544129", "client_name": "mycroft_listener"}, "type": "intent_failure", "data": {"utterance": "tell me a story", "lang": "en-US"}}
13:34:47.091 - SKILLS - DEBUG - {"context": {"ident": "1526477678.5946262-1083544129", "client_name": "mycroft_listener"}, "type": "speak", "data": {"utterance": "Please rephrase your request.", "expect_response": false}}
13:34:53.140 - SKILLS - DEBUG - {"data": {"session": "30db66ab-28ec-4f0f-b50e-3a8d8819830e", "utterance": "hey mycroft"}, "type": "recognizer_loop:wakeword", "context": null}
13:39:32.852 - SKILLS - DEBUG - {"data": {"utterances": ["tell me a story"], "lang": "en-us"}, "type": "recognizer_loop:utterance", "context": null}
13:39:32.875 - SKILLS - DEBUG - {"context": {}, "type": "intent_failure", "data": {"utterance": "tell me a story", "lang": "en-us"}}
13:39:36.590 - SKILLS - DEBUG - {"context": {}, "type": "speak", "data": {"utterance": "Please rephrase your request.", "expect_response": false}}
13:39:55.942 - SKILLS - DEBUG - {"data": {"utterances": ["story time"], "lang": "en-us"}, "type": "recognizer_loop:utterance", "context": null}
13:39:55.962 - SKILLS - DEBUG - {"context": {}, "type": "intent_failure", "data": {"utterance": "story time", "lang": "en-us"}}
13:39:57.637 - SKILLS - DEBUG - {"context": {}, "type": "speak", "data": {"utterance": "Sorry, I don't understand.", "expect_response": false}}
13:40:30.655 - SKILLS - DEBUG - {"data": {"session": "78221bf3-0393-4aee-8af6-01dd011aa8b9", "utterance": "hey mycroft"}, "type": "recognizer_loop:wakeword", "context": null}
13:40:34.713 - SKILLS - DEBUG - {"data": {"session": "78221bf3-0393-4aee-8af6-01dd011aa8b9", "lang": "en-US", "utterances": ["storytime"]}, "type": "recognizer_loop:utterance", "context": {"ident": "1526478030.63805821098728713", "client_name": "mycroft_listener"}}
13:40:34.730 - SKILLS - DEBUG - {"context": {"ident": "1526478030.63805821098728713", "client_name": "mycroft_listener"}, "type": "intent_failure", "data": {"utterance": "storytime", "lang": "en-US"}}
13:40:36.329 - SKILLS - DEBUG - {"context": {"ident": "1526478030.63805821098728713", "client_name": "mycroft_listener"}, "type": "speak", "data": {"utterance": "I don't understand, but I'm learning new things everyday.", "expect_response": false}}
13:40:47.381 - SKILLS - DEBUG - {"data": {"session": "78221bf3-0393-4aee-8af6-01dd011aa8b9", "utterance": "hey mycroft"}, "type": "recognizer_loop:wakeword", "context": null}
13:41:26.487 - SKILLS - DEBUG - {"data": {"session": "78221bf3-0393-4aee-8af6-01dd011aa8b9", "utterance": "hey mycroft"}, "type": "recognizer_loop:wakeword", "context": null}
13:41:35.052 - SKILLS - DEBUG - {"data": {"session": "78221bf3-0393-4aee-8af6-01dd011aa8b9", "lang": "en-US", "utterances": ["storytime"]}, "type": "recognizer_loop:utterance", "context": {"ident": "1526478086.4705761098728713", "client_name": "mycroft_listener"}}
13:41:35.075 - SKILLS - DEBUG - {"context": {"ident": "1526478086.4705761098728713", "client_name": "mycroft_listener"}, "type": "intent_failure", "data": {"utterance": "storytime", "lang": "en-US"}}
13:41:46.755 - SKILLS - DEBUG - {"context": {"ident": "1526478086.4705761098728713", "client_name": "mycroft_listener"}, "type": "speak", "data": {"utterance": "I don't understand, but I'm learning new things everyday.", "expect_response": false}}
13:42:13.958 - SKILLS - DEBUG - {"data": {"session": "78221bf3-0393-4aee-8af6-01dd011aa8b9", "utterance": "hey mycroft"}, "type": "recognizer_loop:wakeword", "context": null}
13:42:18.194 - SKILLS - DEBUG - {"data": {"session": "78221bf3-0393-4aee-8af6-01dd011aa8b9", "lang": "en-US", "utterances": ["storytime"]}, "type": "recognizer_loop:utterance", "context": {"ident": "1526478133.94126531098728713", "client_name": "mycroft_listener"}}
13:42:18.214 - SKILLS - DEBUG - {"context": {"ident": "1526478133.94126531098728713", "client_name": "mycroft_listener", "target": null}, "type": "storytime-skill.siltstorm:StoryTimeIntent", "data": {"target": null, "__tags__": [{"match": "storytime", "from_context": false, "entities": [{"match": "storytime", "key": "storytime", "confidence": 1.0, "data": [["storytime", "storytime_skill_siltstormStoryTimeKeyword"]]}], "key": "storytime", "start_token": 0, "end_token": 0}], "confidence": 1.0, "utterance": "storytime", "intent_type": "storytime-skill.siltstorm:StoryTimeIntent", "storytime_skill_siltstormStoryTimeKeyword": "storytime"}}
13:42:21.870 - SKILLS - DEBUG - {"context": {"ident": "1526478133.94126531098728713", "client_name": "mycroft_listener", "target": null}, "type": "speak", "data": {"utterance": "You got the second choice.", "expect_response": false}}
13:42:28.809 - SKILLS - DEBUG - {"data": {"session": "78221bf3-0393-4aee-8af6-01dd011aa8b9", "utterance": "hey mycroft"}, "type": "recognizer_loop:wakeword", "context": null}
13:42:32.939 - SKILLS - DEBUG - {"data": {"session": "78221bf3-0393-4aee-8af6-01dd011aa8b9", "lang": "en-US", "utterances": ["storytime"]}, "type": "recognizer_loop:utterance", "context": {"ident": "1526478148.79233881098728713", "client_name": "mycroft_listener"}}
13:42:32.961 - SKILLS - DEBUG - {"context": null, "type": "skill.converse.request", "data": {"skill_id": "storytime-skill.siltstorm", "utterances": ["storytime"], "lang": "en-US"}}
13:42:33.062 - SKILLS - DEBUG - {"context": {"ident": "1526478148.79233881098728713", "client_name": "mycroft_listener", "target": null}, "type": "storytime-skill.siltstorm:StoryTimeIntent", "data": {"target": null, "__tags__": [{"match": "storytime", "from_context": false, "entities": [{"match": "storytime", "key": "storytime", "confidence": 1.0, "data": [["storytime", "storytime_skill_siltstormStoryTimeKeyword"]]}], "key": "storytime", "start_token": 0, "end_token": 0}], "confidence": 1.0, "utterance": "storytime", "intent_type": "storytime-skill.siltstorm:StoryTimeIntent", "storytime_skill_siltstormStoryTimeKeyword": "storytime"}}
13:42:36.984 - SKILLS - DEBUG - {"context": {"ident": "1526478148.79233881098728713", "client_name": "mycroft_listener", "target": null}, "type": "speak", "data": {"utterance": "You got the first choice.", "expect_response": false}}
13:42:43.135 - SKILLS - DEBUG - {"data": {"session": "78221bf3-0393-4aee-8af6-01dd011aa8b9", "utterance": "hey mycroft"}, "type": "recognizer_loop:wakeword", "context": null}
13:42:47.611 - SKILLS - DEBUG - {"data": {"session": "78221bf3-0393-4aee-8af6-01dd011aa8b9", "lang": "en-US", "utterances": ["storytime"]}, "type": "recognizer_loop:utterance", "context": {"ident": "1526478163.11968261098728713", "client_name": "mycroft_listener"}}
13:42:47.623 - SKILLS - DEBUG - {"context": null, "type": "skill.converse.request", "data": {"skill_id": "storytime-skill.siltstorm", "utterances": ["storytime"], "lang": "en-US"}}
13:42:47.733 - SKILLS - DEBUG - {"context": {"ident": "1526478163.11968261098728713", "client_name": "mycroft_listener", "target": null}, "type": "storytime-skill.siltstorm:StoryTimeIntent", "data": {"target": null, "__tags__": [{"match": "storytime", "from_context": false, "entities": [{"match": "storytime", "key": "storytime", "confidence": 1.0, "data": [["storytime", "storytime_skill_siltstormStoryTimeKeyword"]]}], "key": "storytime", "start_token": 0, "end_token": 0}], "confidence": 1.0, "utterance": "storytime", "intent_type": "storytime-skill.siltstorm:StoryTimeIntent", "storytime_skill_siltstormStoryTimeKeyword": "storytime"}}
13:42:51.549 - SKILLS - DEBUG - {"context": {"ident": "1526478163.11968261098728713", "client_name": "mycroft_listener", "target": null}, "type": "speak", "data": {"utterance": "You got the first choice.", "expect_response": false}}


#5

I have been watching this thread to see what the solution was and was thinking.
Is there a list of fallback vocab utterances documented anywhere, a sort of “reserved trigger words” list?
I think this could be helpful to avoid these issues with new community developed skills.


#6

That’s a really good point. I wonder if there is a list somewhere already or if one could be automatically generated. @forslund what are your thoughts?


#7

Kathy,
I replaced the contents of ~/skills/storytime-skill/vocab/en-use/StoryTimeKeyword.voc
with
storytime

…didn’t work. I did
sudo rm -r storytime-skill
followed by
msm install https://github.com/Siltstorm/storytime-skill
and
sudo msm update
…still no luck. Is there some way I am supposed to register the intent or utterance? How does it know what is an available command, without scanning the directory full of skills every time?
Thanks again : )

(also, I’m forgetting how to make a scrollable box in a post–how did you do that?):
pi@mark_1:/var/log $ tail -f mycroft-skills.log | grep -i Utterance
21:02:31.298 - SKILLS - DEBUG - {“data”: {“session”: “c9df9e20-37a7-4f17-bd41-eca71eb849ae”, “utterance”: “hey mycroft”}, “type”: “recognizer_loop:wakeword”, “context”: null}
21:02:32.696 - SKILLS - DEBUG - {“data”: {“lang”: “en-US”, “session”: “c9df9e20-37a7-4f17-bd41-eca71eb849ae”, “utterances”: [“storytime”]}, “type”: “recognizer_loop:utterance”, “context”: {“client_name”: “mycroft_listener”, “ident”: “1526504551.29-825261995”}}
21:02:32.711 - SKILLS - DEBUG - {“data”: {“lang”: “en-US”, “utterance”: “storytime”}, “type”: “intent_failure”, “context”: {“client_name”: “mycroft_listener”, “ident”: “1526504551.29-825261995”}}
21:02:32.745 - SKILLS - DEBUG - {“data”: {“expect_response”: false, “utterance”: “I don’t know what that means.”}, “type”: “speak”, “context”: {“client_name”: “mycroft_listener”, “ident”: “1526504551.29-825261995”}}


#8

In Coin Flip, I’m seeing that the intent is registered (I think) via the following lines:

coin_flip_intent = IntentBuilder(“CoinFlipIntent”).
self.register_intent(coin_flip_intent, self.handle_coin_flip_intent)

But I’m not sure how to drive the Mark I to run that intent builder / registration code. Still digging. Is there a “Hello World” equivalent tutorial for skills building?

Edit: Developer link – https://mycroft.ai/documentation/skills/introduction-developing-skills/


#9

Happy Friday all. @Pair-o-twos, any progress on this front?