Picroft not picking up voice

I successfully installed the Picroft image on my sd card, booted it on a Raspberry Pi 3B, got it connected to WiFi and got the device registered on the home.mycroft.ai page. But Mycroft is not responding to the wake word at all.

Mircophone test commands yields the below output.

pi@picroft:~ $ test_microphone 
Shutting down mycroft...
Starting a 5 second test recording...
/home/pi/bin/test_microphone: line 8: mycroft-audio-test: command not found
Playing back the recording...
Restarting mycroft...

Mycroft cli command yields below output:

pi@picroft:~ $ mycroft-cli-client
08:27:38.481 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/configuration/mycroft.conf loaded
08:27:38.844 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/configuration/mycroft.conf loaded
08:27:39.203 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
08:27:39.556 - mycroft.configuration.config:load_local:129 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found
08:27:39.585 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
08:27:40.954 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device/ HTTP/1.1" 301 106
08:27:40.975 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): api.mycroft.ai:80
08:27:41.619 - urllib3.connectionpool - DEBUG - http://api.mycroft.ai:80 "GET /v1/device HTTP/1.1" 302 0
08:27:41.635 - urllib3.connectionpool - DEBUG - Resetting dropped connection: api.mycroft.ai
08:27:43.225 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device HTTP/1.1" 401 38
08:27:43.266 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
08:27:45.278 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/auth/token HTTP/1.1" 401 38
08:27:45.671 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /var/tmp/mycroft_web_cache.json loaded
08:27:46.032 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
08:27:46.381 - mycroft.configuration.config:load_local:129 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found
Locale not supported, please try starting the command and setting LANG="en_US.UTF-8"

	Example: LANG="en_US.UTF-8" ./start-mycroft.sh cli

I even did sudo apt-get update && sudo apt-get install mycroft-core

but still the same result. I’m stuck here now. Can someone please help?

Couple of things on this one;

  • Firstly can you confirm which Picroft image you’re using, @richie777cfc - there is both a Stable one available from March and an Unstable one which Steve has recently released which is Pi 3B+ support. I’m going to assume here that you’re on the Unstable one - but could you please confirm?

  • The LOCALE issue is one we see frequently - by default, on the Stable image, the only installed LOCALE was en_GB. Are you able to show me the output of:

pi@picroft:~/mycroft-core $ echo $LANG
en_GB.UTF-8

This gist also has some great instructions:

Hi @KathyReid ,

  • I’m using raspbian_Picroft_2018-03-14 (the latest stable image).

  • The LOCALE is:
    pi@picroft:~ $ echo $LANG
    en_GB.UTF-8

Btw. I just booted my device today and it suddenly started working. :slight_smile:

1 Like

You can also use ‘sudo raspi-config’ to set that up.

1 Like

It stopped working again today. Below is the log i see when i login via ssh

06:28:45.253 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/configuration/mycroft.conf loaded
06:28:45.577 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/configuration/mycroft.conf loaded
06:28:45.899 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
06:28:46.216 - mycroft.configuration.config:load_local:129 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found
06:28:46.241 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
06:28:47.621 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device/ HTTP/1.1" 301 106
06:28:47.637 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): api.mycroft.ai:80
06:28:48.173 - urllib3.connectionpool - DEBUG - http://api.mycroft.ai:80 "GET /v1/device HTTP/1.1" 302 0
06:28:48.187 - urllib3.connectionpool - DEBUG - Resetting dropped connection: api.mycroft.ai
06:28:49.540 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device HTTP/1.1" 401 38
06:28:49.572 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
06:28:50.784 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/auth/token HTTP/1.1" 401 38
06:28:51.123 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /var/tmp/mycroft_web_cache.json loaded
06:28:51.446 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
06:28:51.767 - mycroft.configuration.config:load_local:129 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found
Locale not supported, please try starting the command and setting LANG="en_US.UTF-8"

	Example: LANG="en_US.UTF-8" ./start-mycroft.sh cli

I left the device on for sometime and now, the wake word is getting triggered automatically every few seconds without me speaking it. I’m not understanding why its happening like this. Log below:

07:00:59.126 - mycroft.client.speech.main:handle_wakeword:56 - INFO - Wakeword Detected: hey jio
07:00:59.137 - SKILLS - DEBUG - {"data": {}, "context": null, "type": "recognizer_loop:record_end"}
07:00:59.163 - SKILLS - DEBUG - {"data": {"session": "0ec05a29-059b-48e9-abf2-b95b9643e526", "utterance": "hey jio"}, "context": null, "type": "recognizer_loop:wakeword"}
07:00:59.276 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
07:01:00.078 - mycroft.client.speech.mic:listen:487 - DEBUG - Waiting for wake word...
07:01:00.453 - SKILLS - DEBUG - {"type": "skill-date-time:TimeSkillupdate_display", "data": {}, "context": null}
07:01:00.988 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "POST /v1/stt?limit=1&lang=en-US HTTP/1.1" 200 None
07:01:01.229 - SKILLS - DEBUG - {"data": {}, "context": null, "type": "recognizer_loop:record_begin"}
07:01:01.200 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
07:01:01.203 - mycroft.client.speech.mic:listen:492 - DEBUG - Recording...
07:01:01.209 - mycroft.client.speech.main:handle_record_begin:35 - INFO - Begin Recording...
Playing WAVE '/opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/res/snd/start_listening.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
07:01:02.880 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "POST /v1/stt?limit=1&lang=en-US HTTP/1.1" 200 None
07:01:02.953 - SKILLS - DEBUG - {"data": {}, "context": null, "type": "mycroft.speech.recognition.unknown"}
07:01:02.974 - SKILLS - DEBUG - {"type": "skill.converse.request", "data": {"skill_id": "skill-joke", "lang": "en-us", "utterances": null}, "context": null}
07:01:02.941 - mycroft.client.speech.listener:transcribe:182 - INFO - no words were transcribed
07:01:02.949 - mycroft.client.speech.listener:transcribe:185 - ERROR - Speech Recognition could not understand audio
07:01:02.994 - SKILLS - DEBUG - {"type": "skill.converse.response", "data": {"skill_id": "skill-joke", "result": false}, "context": {}}
07:01:03.078 - SKILLS - DEBUG - {"type": "skill.converse.request", "data": {"skill_id": "skill-weather", "lang": "en-us", "utterances": null}, "context": null}
07:01:03.099 - SKILLS - DEBUG - {"type": "skill.converse.response", "data": {"skill_id": "skill-weather", "result": false}, "context": {}}
07:01:03.177 - SKILLS - DEBUG - {"type": "skill.converse.request", "data": {"skill_id": "skill-date-time", "lang": "en-us", "utterances": null}, "context": null}
07:01:03.203 - SKILLS - DEBUG - {"type": "skill.converse.response", "data": {"skill_id": "skill-date-time", "result": false}, "context": {}}
07:01:04.102 - mycroft.client.speech.main:handle_record_end:40 - INFO - End Recording...
07:01:04.110 - mycroft.client.speech.main:handle_wakeword:56 - INFO - Wakeword Detected: hey jio
07:01:04.122 - SKILLS - DEBUG - {"data": {}, "context": null, "type": "recognizer_loop:record_end"}
07:01:04.150 - SKILLS - DEBUG - {"data": {"session": "0ec05a29-059b-48e9-abf2-b95b9643e526", "utterance": "hey jio"}, "context": null, "type": "recognizer_loop:wakeword"}
07:01:04.232 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
07:01:04.728 - mycroft.skills.settings:_request_my_settings:440 - DEBUG - getting skill settings from server for TimeSkill
07:01:04.740 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
07:01:05.063 - mycroft.client.speech.mic:listen:487 - DEBUG - Waiting for wake word...
07:01:05.880 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "POST /v1/stt?limit=1&lang=en-US HTTP/1.1" 200 None
07:01:06.000 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device/7c81123e-5406-4ee6-946b-efe38008a6e1/skill HTTP/1.1" 304 0
07:01:06.028 - mycroft.api:send:111 - DEBUG - Etag matched. Nothing changed for: device/7c81123e-5406-4ee6-946b-efe38008a6e1/skill
07:01:06.813 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
07:01:07.409 - mycroft.client.speech.mic:listen:492 - DEBUG - Recording...
07:01:07.414 - mycroft.client.speech.main:handle_record_begin:35 - INFO - Begin Recording...
07:01:07.432 - SKILLS - DEBUG - {"data": {}, "context": null, "type": "recognizer_loop:record_begin"}
Playing WAVE '/opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/res/snd/start_listening.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
07:01:08.491 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "POST /v1/stt?limit=1&lang=en-US HTTP/1.1" 200 None
07:01:09.314 - mycroft.client.speech.listener:transcribe:182 - INFO - no words were transcribed
07:01:09.320 - mycroft.client.speech.listener:transcribe:185 - ERROR - Speech Recognition could not understand audio
07:01:09.322 - SKILLS - DEBUG - {"data": {}, "context": null, "type": "mycroft.speech.recognition.unknown"}
07:01:09.345 - SKILLS - DEBUG - {"type": "skill.converse.request", "data": {"skill_id": "skill-joke", "lang": "en-us", "utterances": null}, "context": null}
07:01:09.367 - SKILLS - DEBUG - {"type": "skill.converse.response", "data": {"skill_id": "skill-joke", "result": false}, "context": {}}
07:01:09.446 - SKILLS - DEBUG - {"type": "skill.converse.request", "data": {"skill_id": "skill-weather", "lang": "en-us", "utterances": null}, "context": null}
07:01:09.467 - SKILLS - DEBUG - {"type": "skill.converse.response", "data": {"skill_id": "skill-weather", "result": false}, "context": {}}
07:01:09.546 - SKILLS - DEBUG - {"type": "skill.converse.request", "data": {"skill_id": "skill-date-time", "lang": "en-us", "utterances": null}, "context": null}
07:01:09.575 - SKILLS - DEBUG - {"type": "skill.converse.response", "data": {"skill_id": "skill-date-time", "result": false}, "context": {}}
07:01:10.326 - mycroft.client.speech.main:handle_record_end:40 - INFO - End Recording...

Hi @richie777cfc according to this log you are using a custom Wake Word, hey jio - is that correct? What are your Wake Word settings in home.mycroft.ai - ie threshold type settings?

Hi @KathyReid Attaching screenshot of the same.

Right, so you will need to adjust your Threshold setting until the sensitivity is “about right”. I would suggest starting with a setting of 1e-45. This setting is explained here in our documentation.

I did that setting but now i powered on the device and it is not recognising my voice at all. I even switched back to the default wake word as well but still it’s not picking up my voice. Also, when I’m doing ssh now , I’m getting the below output:

Traceback (most recent call last):
  File "/opt/venvs/mycroft-core/bin/mycroft-cli-client", line 11, in <module>
    load_entry_point('mycroft-core==18.2.12', 'console_scripts', 'mycroft-cli-client')()
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/pkg_resources/__init__.py", line 479, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2703, in load_entry_point
    return ep.load()
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2321, in load
    return self.resolve()
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2327, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/__init__.py", line 20, in <module>
    from mycroft.skills.core import MycroftSkill, FallbackSkill, \
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/skills/core.py", line 33, in <module>
    from mycroft.client.enclosure.api import EnclosureAPI
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/client/enclosure/__init__.py", line 26, in <module>
    from mycroft.client.enclosure.display_manager import \
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/client/enclosure/display_manager.py", line 40, in <module>
    from mycroft.messagebus.client.ws import WebsocketClient
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/messagebus/client/ws.py", line 21, in <module>
    from websocket import (WebSocketApp, WebSocketConnectionClosedException,
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/websocket/__init__.py", line 22, in <module>
    from ._core import *
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/websocket/_core.py", line 44, in <module>
    from ._handshake import *
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/websocket/_handshake.py", line 29, in <module>
    import uuid
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/uuid.py", line 138
    if not 0 <= time_low < 1<<32L:

Sorry to hear you’re running into these issues, @richie777cfc. Let’s tackle them one by one.

Not recognising voice at all

  • I’m assuming you tried a reboot after changing your Wake Word on home.mycroft.ai?
  • Did the microphone device change at all or is it the same microphone?

errors on ssh connection

  • The error that is shown looks like an error with the uuid library. The only suggestion I have is to try activating the venv using source activate.sh then doing pip upgrade uuid. I haven’t seen this error before on a Picroft if that helps?

You can also try commenting out the following line from /etc/sshd/sshd_config

# Allow client to pass locale environment variables
# AcceptEnv LANG LC_*

Reference link

Github

Thank for being patient with me @KathyReid

  • I tried a reboot and changed the wake word to the default wake word but it still didn’t recognise my voice.
  • Microphone is still the same and the hardware is working.
    I tried the venc activation but still same error.

I’ll try reinstalling picroft after formatting the sd card.

Hi @Denzil_Sequeira, thanks for the suggestion. I tried it and it didn’t work. I’ll reinstall picroft and check again.

Try restarting the ssh service post making the changes using

sudo service sshd restart