Mycroft Community Forum

Wake Word response time

Hi there! I am messing around with Picroft for the first time on a Raspberry Pi 4. I managed to get it set up and paired quite easily using items from the recommended hardware list, and it’s great! However, I am a little concerned about the amount of time between the detection of the wake word and when it begins recording audio. It usually seems to take ~3 seconds. Responses to requests are longer of course, but I am ok with that.

Looking around the forums, I found this topic: Speed of reacting to the wake word - #3 by gekoch

I followed the advice within, and it did not seem to have an impact. It is still taking ~3 seconds to respond, which seems a lot slower than demonstrations in tutorial videos I’ve found online for the same hardware.

23:09:08.901 | INFO | 8857 | main:handle_wakeword:71 | Wakeword Detected: hey mycroft
23:09:08.907 | INFO | 8816 | TimerSkill | stopping repeating event to check for timer expiration
Playing WAVE ‘/home/pi/mycroft-core/mycroft/res/snd/start_listening.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
23:09:11.396 | INFO | 8857 | main:handle_record_begin:41 | Begin Recording…
23:09:13.972 | INFO | 8857 | main:handle_record_end:49 | End Recording…

Is there anything anyone can recommend for improving this response time? Thanks in advance for your time.

That’s unusual.

2021-09-18 17:01:47.165 | INFO     |  1780 | mycroft.session:get:72 | New Session Start: 04fbb967-3b79-4138-a34a-8c258959f856
2021-09-18 17:01:47.168 | INFO     |  1780 | __main__:handle_wakeword:71 | Wakeword Detected: athena
2021-09-18 17:01:47.177 | INFO     |  1780 | __main__:handle_record_begin:41 | Begin Recording...
2021-09-18 17:01:49.040 | INFO     |  1780 | __main__:handle_record_end:49 | End Recording...
2021-09-18 17:01:50.982 | ERROR    |  1780 | mycroft.client.speech.listener:transcribe:239 | list index out of range
2021-09-18 17:01:50.985 | ERROR    |  1780 | mycroft.client.speech.listener:transcribe:240 | Speech Recognition could not understand audio

Also I’ve removed the start_listening wav and replaced it with a .05s of silence file, but the default one is only .35s, which doesn’t explain a three second delay wholly. Is anything else running on your pi? What’s going on with the timer skill?

i would start a debug cli and look what output you get in between. Maybe something to work with.

1 Like

Hey guys, Thank you for your responses.

@baconator I looked into it and it turns out that there were a few rogue python processes running on my Pi, which I found strange considering it’s a fresh image. After I rebooted the device, the response time is much faster now! Thanks for the hint haha.

As far as the timer skill is concerned… I am not sure. It seems to print that line to the logs every time it responds to the wake word, but it doesn’t seem to effect the response time.

Here is the new response time, which is much better now:

19:52:45.559 | INFO     |   798 | TimerSkill | stopping repeating event to check for timer expiration
19:52:45.550 | INFO     |   804 | mycroft.session:get:74 | New Session Start: e45f7e91-8de3-4ae6-891a-48dfd0f3d2ed
19:52:45.553 | INFO     |   804 | __main__:handle_wakeword:71 | Wakeword Detected: hey mycroft
Playing WAVE '/home/pi/mycroft-core/mycroft/res/snd/start_listening.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
19:52:46.001 | INFO     |   804 | __main__:handle_record_begin:41 | Begin Recording...
19:52:48.070 | INFO     |   804 | __main__:handle_record_end:49 | End Recording...
19:52:49.388 | ERROR    |   804 | mycroft.client.speech.listener:transcribe:239 | list index out of range
19:52:49.390 | ERROR    |   804 | mycroft.client.speech.listener:transcribe:240 | Speech Recognition could not understand audio
1 Like

The timer skill class has methods that stop and restart it (the repeating check) when the speech processing is over, so that’s default. The log.info should be log.debug to not confuse ppl