Build an open future with us.

Invest in Mycroft and become a community partner.

[SOLVED] Problem with my skill


#1

I am working on a skill can deal with 2 different utterance. After coding it and getting it in the picroft, only one of the utterances work. The reason_intent is the one that does not work.
Any help is appreciated


#2

I am not 100% certain on this but your Keyword files are very similar and not mutually exclusive. This may be tripping the code up. If I speak “what is a reason to code” you can see that this statement also has everything it needs to trigger both intents. You could infact do this with 1 intent.
I recommend breaking up your keywords to something like this.
WhatKeyword.voc --> contains the word what
ReasonKeyword.voc —> contains the word reason
CodeKeyword.voc --> conains the word code
Now your new definition_reason_intent will be built as follows… require(“WhatKeyword”).require("CodeKeyword).optionally(“ReasonKeyword”).build
now in your intent handler you can check to see if the word reason was actually spoken by using
reason_kw = message.data.get(“ReasonKeyword”)
if reason_kw:
self.speak_dialog(“reason”)
else:
self.speak_dialog(“definition”)

I would recommend reading this from one of the community members, it is very clear on using voc files properly.


#3

If we’re helping to debug Skills, then it’s super useful to have a look at your skills.log file as well. This is found in /var/log/mycroft/.

Some other things to check:

  • Check that the STT is correctly transcribing the Intent. Your .voc keywords are very specific, so the STT will need to be very specific in transcribing them.

  • It’s very helpful to put a tail on the skills.log as well to see what’s happening.


#4

How did you go with this one @avellant?


#5

I used @pcwii advice and was able to correct the mistake


#6

Thanks for confirming, @avellent :slight_smile: