Mycroft on AIY Voice kit

Anyone who has mycroft running on a AIY Voice kit ? this little box seems perfect for mycroft, and I just assempled one and flashed it whith picroft.
Mycroft seems to work, but missing configuration og voicehat etc.

So if someone has done this I would be happy so I dont has to figure everything out myself :wink:

@steve.penrod @J_Montgomery_Mycroft

Steve/Josh,

Did you ever get that one up and running that I got for you?

Nate

I’m embarrassed to say that I never did ( though Steve has a fully assembled unit ). I didn’t have soldering setup here in Palo Alto so I never got around to it.

I do have it and plan to get to it at some point. Maybe I’ll find some time over Christmas.

Yup got it working.

Also made an attempt on porting some of the python code of the led and button:
Some code that seems to be working:

https://gist.github.com/tjoen/9851436cedb68f6d6a08be14067c85f4

Tjoen

I just got Mycroft up and running on the Google AIY Voice Kit as well.

It’s much easier to install Mycroft on the Google Voice Kit image rather than fiddle with the Voice HAT drivers in picroft. For reference, here is the procedure I used after flashing the Google Voice Kit image and booting it up:

sudo apt-get update

Install Mycroft for Linux –

cd ~/
git clone https://github.com/MycroftAI/mycroft-core.git
cd mycroft-core
bash dev_setup.sh

Start the PulseAudio daemon (might need to reboot after doing this the first time) –

pulseaudio -D

Start Mycroft –

cd ~/mycroft-core
./start-mycroft.sh debug

Obviously you’ll want to have a bash script to run PulseAudio and Mycroft at system startup if you plan on having your Voice Kit be a standalone Mycroft box.


If anyone is ambitious enough to try to get the Voice HAT drivers working on picroft, here are some steps I took before I gave up and did it the other way around:

sudo apt-get update
sudo apt-get upgrade

Get drivers from the raspberry pi kernel –

sudo apt-get install raspberrypi-kernel

Clone the Google AIY Voice project and use it to configure the Voice HAT driver –

cd ~/
git clone https://github.com/google/aiyprojects-raspbian.git voice-recognizer-raspi
cd ~/voice-recognizer-raspi
sudo scripts/configure-driver.sh
sudo scripts/install-alsa-config.sh
sudo reboot

** Not sure if this is necessary **

cd ~/voice-recognizer-raspi
sudo scripts/install-deps.sh
sudo scripts/install-services.sh

List PulseAudio sources –

pacmd list-sources

Set the default source to whichever one is the microphone (index 1 for me) –

pacmd set-default-source 1

At this point Mycroft was able to output TTS through the speaker using the “speak” command, e.g. “speak hi”. He could also process speech through the mic, and his responses to my commands were output to the debug screen. However, his responses were not output to the speaker for whatever reason. It’s probably just a configuration file that needs fixing, but I wasn’t able to figure it out.

1 Like

That would create a virtualenv on the pi, right?
I’m not sure if I want that. It seemed to give me more speech lag on my ubuntu tests on the mycroft,

There is much more info on how to fix those speech problems you had installing on mycroft image in another thread: PiCroft issue with pairing

Yes, the virtualenv is all I was able to get working. Thanks for pointing me to the other thread!

It looks like you are all much farther along, and I appreciate the help.

Hey,
I tried installing following @tnoms steps from the image of Google AIY and I am getting some some modules not loading when in the CLI:

pi@raspberrypi:~/mycroft-core $ ./start-mycroft.sh debug
Starting all mycroft-core services
Initializing...
Starting background service bus
Starting background service skills
Starting background service audio
Starting background service voice
Starting cli
08:57:19.410 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /home/pi/mycroft-core/mycroft/configuration/mycroft.conf loaded
08:57:19.543 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /home/pi/mycroft-core/mycroft/configuration/mycroft.conf loaded
08:57:19.671 - mycroft.configuration.config:load_local:129 - DEBUG - Configuration '/etc/mycroft/mycroft.conf' not found
08:57:19.798 - mycroft.configuration.config:load_local:129 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found
08:57:19.819 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
08:57:20.351 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device/9924b275-1557-42e3-9468-cfadf78960f0 HTTP/1.1" 200 368
08:57:20.475 - mycroft.api:send:115 - DEBUG - Updating etag for: device/9924b275-1557-42e3-9468-cfadf78960f0
08:57:20.594 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /home/pi/mycroft-core/mycroft/configuration/mycroft.conf loaded
08:57:20.719 - mycroft.configuration.config:load_local:129 - DEBUG - Configuration '/etc/mycroft/mycroft.conf' not found
08:57:20.845 - mycroft.configuration.config:load_local:129 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found
08:57:20.856 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
08:57:21.534 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device/9924b275-1557-42e3-9468-cfadf78960f0/setting HTTP/1.1" 200 2927
08:57:21.658 - mycroft.api:send:115 - DEBUG - Updating etag for: device/9924b275-1557-42e3-9468-cfadf78960f0/setting
08:57:21.669 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
08:57:24.773 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device/9924b275-1557-42e3-9468-cfadf78960f0/location HTTP/1.1" 200 4
08:57:24.918 - mycroft.api:send:115 - DEBUG - Updating etag for: device/9924b275-1557-42e3-9468-cfadf78960f0/location
08:57:25.094 - mycroft.configuration.config:load_local:129 - DEBUG - Configuration '/etc/mycroft/mycroft.conf' not found
08:57:25.218 - mycroft.configuration.config:load_local:129 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found
pi@raspberrypi:~/mycroft-core $



Log Output:                                                                 0-32 of 32
======================================================================= mycroft-core 18.2.5 ===
~~~~ft.client.speech.listener:create_wake_word_recognizer:243 - INFO - creating wake word engine
~~~~.643 - mycroft.client.speech.hotword_factory:create_hotword:264 - INFO - creating yo brother
~~~~t.client.speech.listener:create_wakeup_recognizer:261 - INFO - creating stand up word engine
~~~~:11.848 - mycroft.client.speech.hotword_factory:create_hotword:264 - INFO - creating wake up
09:05:12.618 - mycroft.messagebus.client.ws:on_open:62 - INFO - Connected
~~~~INFO - ATTEMPTING TO LOAD SKILL: mycroft-pairing.mycroftai with ID mycroft-pairing.mycroftai
09:05:14.012 - mycroft.skills.core:load_skill:129 - INFO - Loaded mycroft-pairing.mycroftai
~~~~- INFO - ATTEMPTING TO LOAD SKILL: mycroft-volume.mycroftai with ID mycroft-volume.mycroftai
09:05:14.171 - VolumeSkill - INFO - ********** Reeg handlers
09:05:14.187 - VolumeSkill - INFO - ********** Handlers registered
09:05:14.208 - mycroft.skills.core:load_skill:129 - INFO - Loaded mycroft-volume.mycroftai
~~~~5 - INFO - ATTEMPTING TO LOAD SKILL: mycroft-timer.mycroftai with ID mycroft-timer.mycroftai
09:05:15.602 - mycroft.skills.core:load_skill:129 - INFO - Loaded mycroft-timer.mycroftai
~~~~5 - INFO - ATTEMPTING TO LOAD SKILL: mycroft-alarm.mycroftai with ID mycroft-alarm.mycroftai
~~~~- mycroft.skills.core:load_skill:144 - ERROR - Failed to load skill: mycroft-alarm.mycroftai
Traceback (most recent call last):
File "/home/pi/mycroft-core/mycroft/skills/core.py", line 115, in load_skill
('.py', 'rb', imp.PY_SOURCE)
File "/usr/lib/python3.5/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 693, in _load
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 673, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/opt/mycroft/skills/mycroft-alarm.mycroftai/__init__.py", line 17, in <module>
from pytz import timezone
ImportError: No module named 'pytz'
09:05:17.931 - mycroft.skills.padatious_service:train:68 - INFO - Training...
09:05:18.033 - mycroft.skills.padatious_service:train:70 - INFO - Training complete.
  ^--- NEWEST ---^ 

The speaker and microphone are working but whenever i talk to it the only reply I get is ‘Wait until I finish booting up’

thanks for any advices on this!

Hi there @zhampu, welcome and great to have you here.

This error is likely caused by us being “in between” two releases - 18.2.5b and 18.2.6b. We’ve had a couple of hold-ups on the 18.2.6b release, and it hasn’t quite shipped yet - apologies.

If you try pip install pytz then try again, does that do the trick?

Please do let me know how you go.

Best, Kathy