Picroft 2018-09-12 and the Google AIY Voice Hat


I did notice (by using the right stretch links) that the changes are in the stretch branch.
As I did check the three lines are right in /etc/asound.conf (the content of your AIY-asound.conf)

After the wget for the auto_run.sh you did also rename auto_run.sh.1 to auto_run.sh
(for getting the option 4) Google Voice hat)?

What did you after “git pull” and “msm update”?

I did a “sudo reboot” and had to select “(Y)es” for config" and then the 4) for Google Voice hat.

Or is there anything other to select when the Pi has been rebooted after the “git pull” and “msm update”?

BTW: Would it be a problem if a HDMI-Monitor is connected to the Pi? (second soundcard?)
I did try it without and with a monitor…

After updating I do allways get this after login:
Traceback (most recent call last):
File “”, line 1, in
File “/home/pi/mycroft-core/mycroft/init.py”, line 17, in
from mycroft.api import Api
File “/home/pi/mycroft-core/mycroft/api/init.py”, line 26, in
from mycroft.identity import IdentityManager, identity_lock
File “/home/pi/mycroft-core/mycroft/identity/init.py”, line 21, in
from mycroft.util.combo_lock import ComboLock
File “/home/pi/mycroft-core/mycroft/util/combo_lock.py”, line 16, in
from fasteners.process_lock import InterProcessLock
ImportError: No module named ‘fasteners’


I dont know if having a HDMI monitor connected should do any good or bad…I ssh’ing to my picrofts.

I first delete auto_run.sh and then wget new one OR wget new one and rename as you do.

Yhen reboot and follow instructions -and reboot again when it sayes it is needed.

Then after reboot before i exiting out of CLI and did git pull and msm update and then reboot

Then i came up.

It isnt a easyly smooth install - i know it could be much better :slight_smile:


So - I did get it working but had to do 3 additional steps! :slight_smile:

When I did try it with the guide above this ebening - I did get stuck the same way:
Traceback error and no reactions wihle selecting the 2nd time the 4) Google Voice hat.

But then after leaving to cli I did read a message to rerun

This installed/checked something and doenst like pip 18.0 but want to install pip 18.0 :slight_smile:

Some lines later it suggest to install/upgrade to pip 18.1 with
pip install --upgrade pip

After pip 18.1 was installed I did reboot and did exit via N to cli and my-/picroft did start.

But only the Mic does the job :frowning:
aplay -l shows correct
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpigooglevoi [snd_rpi_googlevoicehat_soundcar], device 0: Google voiceHAT SoundCard HiFi voicehat-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

and your 3 lines are also copied correct to /etc/asound.conf

So I checked with alsamixer the Pulseaudio-Ou-Device and it was at 0%
So I changed it to 50% and saved/exited with Escape (alsmixer in a differnt ssh-session).

After that I could ask picorft something and then he do beep and respond via the speaker :slight_smile:

BUT after reboot the volume is at 0% again…
I did try the following:
set volume via alsamixer ad user pi
sudo alsactl store

But also again 0% volume after reboot :frowning:

[EDIT] a
sudo -u pi amixer sset Master 75% (as root) or
amixer sset Master 75% (as pi)
in /etc/rc.local (before “exit 0”) could solve the problem
but it did only work from a SSH-shell - maybe I have to add a wait statement?


Great to hear you got him working……But the process is not easy.

I did notise that alsamixer were at zerro to - so adding to the script to set it to 75% would be a good idea.
I dont understand why you nedded /home/pi/mycroft-core/dev_setup.sh as I remember that that to is done in the scrpt. I did when I did run it…Strange.

I think the picroft scrit could benefit from a rewrite, so installation of hardware were in differet scripts one for every hardware one will write installation for.
That would make the installation of picroft simpler - get mycroft up and running, and then add hardware. But that is just my opinion.


I did add the 75% to

# Use this script to execute audio setup actions
sudo amixer cset numid=3 "1" > /dev/null
# amixer set PCM 99%
amixer sset Master 75%

Now sound is working at boot time :slight_smile:


In picroft-google-aiy-voicekit.andlo/_init_.py, create_skill() creates a new PicroftGoogleAiyVoicehat, but the class is PicroftGoogleAiyVoicekit so loading the skill fails - last word is ‘hat’ vs ‘kit’


edited to say: had to add the master fix to the audio setup script. meh.


I got my AIY kit working, but only when I signin to it. There are no mycroft scripts in /etc/init.d/

What do I need to do to get the startup scripts?

One thing I had to do (like guidol did above) was modify /home/pi/audio_setup.sh to have “amixer set Master 75%” I had to do this as I had no PCM controls (used “amixer scontents” to see what I do have).


Hi there @sixlinux, welcome, it’s great to have you here.
We pushed a commit yesterday which is designed to address several AIY kit issues.

Are you able to update your Picroft - a reboot should do it - and see if that addresses the issue?


Reboot did not fix it, still nothing in /etc/init.d


Reboot did not fix it. I tried imaging a SD card from picroft 2018-09-12, and it did not have the /etc/init.d scripts still. This time I selected option 1 for the audio setup and I got a PCM decvice. After that, the audio still did not work and I got the same error as others regarding the "aiy-python-wheels: protobuf not supported on armv6.1.

So I started over again:
I imaged a SD card from picroft 2018-09-12
I selected 1) Speakers for the audio
Audio test does not work, but continue since that is fixed later
I selected 3) Google AIY

I did a cntl c as soon as it tried to run mycroft (to prevent it from loading “aiy-python-wheels”).
Then I ran andlo’s script: “https://raw.githubusercontent.com/andlo/picroft-google-aiy-voicekit-skill/master/install_AIY.sh” This takes awhile, then reboot.
I also did a mycroft-msm install picroft-google-aiy-voicekit in order to get the button to work.

Still nothing in /etc/init.d, so mycroft services do not start unless I signon to it.


Ok, waited awhile, rebooted, it did updates, now working!


Wow… this is a lot to follow, but it’s been a couple months since this was updated, and I’m still not having any luck, even following what I think is all the recommendations above. I seem to be stuck with this:

protobuf-3.6.1-cp35-cp35m-linux_armv6l.whl is not a supported wheel on this platform.

In the bootup, I was getting this:

Traceback (most recent call last):
File “/usr/lib/python3.5/runpy.py”, line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File “/usr/lib/python3.5/runpy.py”, line 109, in _get_module_details
File “/home/pi/mycroft-core/mycroft/init.py”, line 17, in
from mycroft.api import Api
File “/home/pi/mycroft-core/mycroft/api/init.py”, line 26, in
from mycroft.identity import IdentityManager, identity_lock
File “/home/pi/mycroft-core/mycroft/identity/init.py”, line 21, in
from mycroft.util.combo_lock import ComboLock
File “/home/pi/mycroft-core/mycroft/util/combo_lock.py”, line 16, in
from fasteners.process_lock import InterProcessLock
ImportError: No module named ‘fasteners’

but I did find that I could do:
pip install fasteners
And it got me beyond this - I only bring it up in case it helps refine the initial install script or helps someone else, but I’m not sure where to go from here… From the description, it seemed that the AIY kit hardware was pretty much supposed to be working “out of the box” with the raspbian-stretch_Picroft_2018-09-12 image, but I’m at a loss… Any ideas??


Great to hear you are going :slight_smile: The strange thing is I dossnt see same issues when I reflash. OK I havnt reflashed for a monts or so. Yo can open a issue on the gitrepo that you see that module fasteners are missing.
I am just not ure if that is the AIY skill that causes this though. But I will look into it as soon as I reflash again.


Could anybody get it to work in the last weeks? Have tried the methods given above with no luck …


Hi Olaf.

By no luck - what do you mean. Any hints of what isnt working? Did the setupwizard install the aiy drivers?

What does aplay -l shows?
It should show something like:

**** List of PLAYBACK Hardware Devices ****
card 0: sndrpigooglevoi [snd_rpi_googlevoicehat_soundcar], device 0: Google voiceHAT SoundCard HiFi voicehat-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0


Hi @andlo,
I played around a bit today and this is what I have right now, by doing this:

(1) I use a vanilla 9-12 stable image on a v1 board

(2) When it boots I Ctrl-C at the Picroft image

(3) I add my Wifi in /etc/wpa…, delete auto_run.sh and reboot

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Ctrl + X and then Y

(4) And download/replace your 2 scripts from stretch and reboot

wget https://raw.githubusercontent.com/andlo/enclosure-picroft/stretch/home/pi/auto_run.sh
wget https://raw.githubusercontent.com/andlo/enclosure-picroft/stretch/home/pi/AIY-asound.conf

(5) Guided setup with Y, 4 for AIY and wait around 10 min for install

(6) Type R for reboot as we just installed AIY

(7) N command line (no fasteners)

(8) Updated with

cd mycroft-core
git pull
msm update

I am new to mycroft, so I am a bit at a loss as what to do now?

  • alsamixer shows that sound is 0, but I can change that with the hints from above.
  • aplay -l shows exactly your given output
  • mycroft-cli-client shows fasteners error (pip install fasteners fixes it), then starts and shows the attached output log.
  • When I log in, it says I should update via ./dev_setup.sh but that didn’t work either

Looks like I am missing something or what else can I debug?



GREAT - you done more than needed I think but that is OK.
As you did a git pull you have to run dev_setup.sh as stated. But it is a bit misleading that it says ./dev_setup.sh. That is right when you are in the mycroft-core directory.

So cd /home/pi/mycroft-core and then ./dev_setup.sh or simple just run


`But I think the 9-12 can install the AIY right from the setup wizard. Same whith wifi.


Thanks, I did run mycroft-core/dev_setup.sh but then I get the classic

protobuf-3.6.1-cp35-cp35m-linux_armv6l.whl is not a supported wheel on this platform.

Not sure what to do about it as pip install protobuf does not change it


Puha, that was tricky. After trying a lot, this will give you a working Picroft + AIY (without wheels, but that is only for installs):

  1. Vanilla 2018-09-12.img file on SD card and boot

  2. At Mycroft logo do Ctrl-C

  3. Add Wifi in /etc/wpa… and reboot

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Insert following text


to get out

Ctrl + X and then Y and Enter
  1. Ctrl-C at startup and download and run new install file from

wget https://raw.githubusercontent.com/andlo/picroft-google-aiy-voicekit-skill/master/install_AIY.sh
chmod +x install_AIY.sh
./install_AIY.sh (this takes 15 min)
sudo reboot5

  1. Wait for startup then run ./mycroft-core/dev_setup.sh as long as it tells you and reboot afterwards, eventually it starts into the cli and starts intializing. This takes a while, you should see output and you are asked to register at home.mycroft.ai, do that and wait a while until it stops loading skills.

  2. Ctrl-C and install the AIY skill (you can do that in a different ssh window) and reboot

mycroft-msm install https://github.com/andlo/picroft-google-aiy-voicekit-skill.git

  1. Sound is 0, so I set it with alsamixer once it booted, will change that later.

@andlo, thanks for providing this skill.

Post if you have any questions installing the current version