Open AIIX opened 3 years ago
the problems goes deeper than that, if you make an intent with an infinite loop and dont handle it in stop it will keep going forever, if you cancel a dialog and the intent just starts another one you still have a problem
i recall some bug reports with the fairy tale reading skill about this exact issue, mycroft needs a mechanism to kill execution of random arbitrary code from skills
check my solution here https://github.com/OpenVoiceOS/ovos_utils/pull/34
Hey, thanks for writing this up. Very much agree that it's something we need to address.
It seems like there may be two sides of this that we may want to handle separately - the audible speech output, and the Skill process. From that come a range of possible user stories:
Interested to hear your thoughts, or whether this is veering off into a completely different direction.
As a Skill Developer, I can stop dialog being spoken that was initiated by my Skill.
As a Skill Developer, I can prevent Mycroft speaking while my Skill is active.
- This one will need some discussion - it feels like there are likely negative consequences here - eg what about reminder notifications.
As a Skill Developer, I can kill an existing handler within my Skill.
- This one feels strange, the existence of this issue probably points to a different problem. Eg we fixed the Fairy Tale Skill so users could say stop and it would end after that sentence.
I think this issue does cover at least some scenarios above, but I would like to stress immediately on the GUI direction/side because as a skill developer working on implementing both GUI and VUI I find that without having those methods available it becomes very difficult to develop a consistent experience and sync where authors can programmatically stop dialogs and speech when pages change or new content is displayed.
Rest of the user stories make sense, but they could be probably solved separately because they touch different cases.
Is your feature request related to a problem? Please describe. There seems to be no method available for cancelling a non interactive dialog self.dialog or interactive dialog self.get_response or self.ask_yesno dialog
Case problem scenario:
Describe the solution you'd like Allow skill authors to decide when they would like the speech interaction and spoken dialogs to cancel programmatically via following methods