I have a skill that passes the utterance to the messagebus, but my issue is that after answering my question… Mycroft goes into infinite loop and keeps answering the same thing.
The problem is that for example I pass the utterance “Could you tell me the time please?”, I want to check if the sentence is polite and then have the message bus check for all other skills to match this utterance. The issue now is that, when it checks if the utterance is polite or not, mycroft goes into polite skill dialog to say whether this way a polite way of asking or not and then keeps checking the same thing for polite skill instead of going into other skills.
Is there a way to deactivate my current(polite) skill, once I get the first answer?
Some more context would be helpful, is the skill available on github?
If you’re reacting to your own messages you might need to set some blanking timer (discard messages for a time after handling one) or add an extra data field to be able to reject your own messages.
You might also remove the event handler in the event handler and set it up again when mycroft gets a wakeword.
Those are the best suggestions I can provide without more details on the implementation
Thanks for the reply. It’s not available right now, but I can show you the entire code later.
So, yes I’m reacting to my own message. For example take- “Could you please tell me the time”, I want mycroft to say “That is polite way of asking” and then say “it is 3:35 PM”. The thing is, it works if I have a polite intent that is triggered by “Could you”, but now I’ve changed the intent to “Activate Polite mode” that is spoken before anyother utterance to activate the skill and then I want Mycroft to rate “could you tell me the time”, if the utterance is polite it’ll say “that’s polite” + “the time is …”. The problem right now, is that it gets stuck in a loop if I ask “could you please tell me the time” because its not searching for other skills for response at all (I send it to messagebus to check all skills) and it keeps looking for a response from my polite skill.
I pass the utterance to the messagebus, so that mycroft can try to match the intent to every skill that is installed on the device (time, weather, dice etc)
I hope I explained it a bit better.