ChristopherRogers1991 / mycroft_routine_skill

Create, run, and schedule routines with Mycroft
GNU General Public License v3.0
30 stars 13 forks source link

Appears to have punctuation problems #17

Open burnsfisher opened 2 years ago

burnsfisher commented 2 years ago

I created a routine called "I'm here". It was fine in terms of the contraction being understood by voice recognition, and it was place ok in routines2.json. However:

1) The routine was never run even when I typed in the words 2) Even worse, I think it causes some sort of corruption in picroft. Even after I manually edited to remove that routine, (and stopped and restarted skills) bad things happened. Phrases were repeated, lots of array overflow errors appeared in the log, etc.

I have totally rebooted the pi and now it seems ok.

burnsfisher commented 2 years ago

Note it also was ok creating the routine "late night power down" but either trying to schedule it or invoke it caused Picroft to think I was telling IT to power down. Probably not "routine's" fault, but maybe there is a way to warn about unusable routine names.

Thanks...

ChristopherRogers1991 commented 2 years ago

Do you happen to have logs you could share for these? The power down issue in particular. (I do not currently have internet at home, so am unable to repro at the moment.) I've seen similar issues in the past, which have been caused by padatious taking precedence adapt. In this past, Mycroft core has made adjustments to correct that, and stated that adapt should win out, but it's possible the state of the world has changed. In any case, if you've got logs, we can open an issue on the core repo and see if they can resolve things.

If not, the next step might be to disable padatious on your device. Depending on the skills you use, this may have no impact, other than to ensure it doesn't interfere with other skills.

Potentially we could also try to use both adapt and padatious in the skill, though I'd have to look more into padatious to see what's possible.

For the punctuation issue, I'd probably have to see logs or get a local repro to make any sense of it. That doesn't sound like anything I've seen before.

burnsfisher commented 2 years ago

Ok, I'm beginning to see a little better.

I tried doing these again and could not reproduce the corruption issue. That may have been related to misunderstanding days of the week or time (which I fixed in the pull request) or something else that corrupted the routine file.

I'm here still does not work. I can create the routine, but simply does not execute either the routine or any intent that contains the routine name (schedule, delete, etc). The log does not seem too interesting. It just did not do it exactly as though it was not a routine.

18:07:16.241 | INFO | 24298 | main:handle_record_begin:41 | Begin Recording... 18:07:16.288 | DEBUG | 28822 | VolumeSkill | Volume before mute: 89 18:07:16.288 | DEBUG | 28822 | VolumeSkill | 89 18:07:16.288 | DEBUG | 28822 | VolumeSkill | 0 18:07:19.786 | DEBUG | 28822 | VolumeSkill | Finding Alsa Mixer for control... 18:07:19.777 | INFO | 24298 | main:handle_record_end:49 | End Recording... 18:07:19.822 | DEBUG | 28822 | VolumeSkill | 89 18:07:19.830 | DEBUG | 24298 | urllib3.connectionpool | Starting new HTTPS connection (1): api.mycroft.ai:443 18:07:20.662 | DEBUG | 28822 | mycroft.skills.intent_service:_normalize_all_utterances:72 | Utterances: [("delete routine i'm here",)] 18:07:20.631 | DEBUG | 24298 | urllib3.connectionpool | https://api.mycroft.ai:443 "POST /v1/stt?lang=en-US&limit=1 HTTP/1.1" 200 28 18:07:20.641 | DEBUG | 24298 | mycroft.client.speech.listener:transcribe:224 | STT: delete routine i'm here 18:07:20.645 | INFO | 24298 | main:handle_utterance:76 | Utterance: ["delete routine i'm here"] 18:07:20.730 | DEBUG | 28822 | mycroft.skills.intent_services.padatious_service:_match_level:47 | Padatious Matching confidence > 0.95 18:07:20.763 | DEBUG | 28822 | mycroft.skills.fallback_skill:handler:67 | Checking fallbacks in range 0 - 5 18:07:20.740 | DEBUG | 24298 | mycroft.client.speech.mic:listen:711 | Waiting for wake word... 18:07:20.834 | DEBUG | 28822 | mycroft.skills.fallback_skill:handler:67 | Checking fallbacks in range 5 - 90 18:07:20.835 | INFO | 28822 | QuestionsAnswersSkill | Searching for delete routine i'm here 18:07:20.840 | DEBUG | 28822 | mycroft.skills.mycroft_skill.event_container:add:153 | Added event: fallback-query.mycroftai:QuestionQueryTimeout 18:07:20

At first I thought maybe it was not being loaded, but "list routines" does show it. In fact it appears to be correct all the way to "self.register_vocabulary".

burnsfisher commented 2 years ago

Oh, and the "power down" one seems to depend on whether the voice interpreter translates what I say as "power down" or "power-down".

ChristopherRogers1991 commented 2 years ago

Hmm... not sure what's going on with "I'm here". That'll probably take a little digging.

For the "power down" vs "power-down", you could manually (via edit the config, or using the console) create a "late night power-down" routine that just executes "late night power down" - this would effectively give you an alias, and should (I hope) ensure that works and doesn't shut the device down.

ChristopherRogers1991 commented 2 years ago

A note mostly for myself - I wonder if Adapt gets tripped up on "I'm" - possibly it does normalization or something that causes an issue.