Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Moved: New Skill: CatchAll Fallback asks to repeat phrase when no intent determined #2612

Closed
auwsom opened this issue Jun 7, 2020 · 5 comments

Comments

@auwsom
Copy link

auwsom commented Jun 7, 2020

Following the docs on Fallbacks here: https://mycroft-ai.gitbook.io/docs/skill-development/skill-types/fallback-skill, and the example here: https://github.com/forslund/fallback-meaning, and figuring out the correct syntax by trial and error here: #2611, and adding the following lines of code (the second part replacing the Arthur Dent intent finding), the fallback now asks a follow up question 'What was that?' whenever an intent cannot be determined. (several variation on that vocab could be added to the self.speak_dialog('CatchAllFallback')

from mycroft.messagebus.message import Message
.....
    def handle_fallback(self, message):
        self.speak('what was that?')
        self.bus.emit(Message('recognizer_loop:wakeword', {"utterance": "homie"}))
        return True
@auwsom
Copy link
Author

auwsom commented Jun 7, 2020

I recommend this be a skill in the marketplace or possible a default skill in the core 'cannon'.

@forslund, thanks for the example!.. feel free to add this CatchAll skill if you'd like.

@auwsom auwsom changed the title CatchAll Fallback asks to repeat phrase when no intent determined New Skill: CatchAll Fallback asks to repeat phrase when no intent determined Jun 7, 2020
@forslund
Copy link
Collaborator

forslund commented Jun 7, 2020

Might be something that could be added to the fallback-unknown skill Maybe move the issue there or to the mycroft-skills repo (since this is more skill related than core related).

Glad that my old example skill came in handy :)

@auwsom
Copy link
Author

auwsom commented Jun 7, 2020

@forslund Ah right, the skills repo, yes.. will move. (I had started it in the fallback-unknown skill, but didnt want it to tell me to 'Please wait a moment as I finish booting up'.. which, actually, I dont see in the dialogs for that skill, so I wonder if its coming from elsewhere.)

Hey, I'm actually debugging it right now.. I didnt realize the it is overriding other skills until I started working on another one. Any suggestion on how to catch just everything that isnt a skill intent? I thought that was what the fallbacks did, but your example uses several word verification steps.

@auwsom auwsom changed the title New Skill: CatchAll Fallback asks to repeat phrase when no intent determined Moved: New Skill: CatchAll Fallback asks to repeat phrase when no intent determined Jun 7, 2020
@auwsom
Copy link
Author

auwsom commented Jun 7, 2020

moving this to MycroftAI/mycroft-skills#1340
and closing

@auwsom auwsom closed this as completed Jun 7, 2020
@forslund
Copy link
Collaborator

forslund commented Jun 7, 2020

To answer your question, the fallbacks have priority (1-100) so a fallback with the prio 1 will be checked before a fallback with prio 2.

The example has the prio 1.

        self.register_fallback(self.handle_fallback, 1)

which is good to show it's executing BUT is bad since 1 is before a lot of important things:

before the Padatious intent parser which is prio 10 I think. The fallback-unknown is set to prio 100

        self.register_fallback(self.handle_fallback, 100)

So you might want to set your skill to 99 to be just before the fallback-unknown but let all other skills try to match the sentence.

See the api documentation for some guide to the ranges: https://mycroft-core.readthedocs.io/en/latest/source/mycroft.html#fallbackskill-class

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants