I love old fashioned things, but live in a very new fashioned world. On a recent purge of a cluttered garage I found an old children’s radio in the shape of Mr Noisy. This I thought was awesome but also thought it was such a shame it didn’t work any more. A few Pimoroni purchases later I set to work bringing it back to life in the form of a Google Home device.
Whats inside ?
First step was to open up the old device and decide what to replace. Once open the inside consisted of a speaker and circuit board with a few dials for retuning and volume.
Although nothing on the board could be reused it was perfect for a platform on which a Rasp Pi Zero could be mounted, so I stripped all the components and cleaned it up.
On the inside i needed parts small enough to fit inside so went for:
- Raspberry Pi Zero + memory card
- Mini 4 Ohm Speaker
- JST-PH 2 Wire Assembly
- ReSpeaker 2Mics pHAT
Speaker was smaller than the original so fashioned a template and used some Pibow casing to act as a fixed mount for the Pi Zero.
Adding the brain
Obtain the latest version of Raspbian and flash onto memory card.
N.B> Drop in ssh.txt and wpa_supplicant.conf with wifi details to let you instantly ssh on your wifi
Add Netatalk so you can see the drive externally
Follow the setup steps
Install seeed voicecard
Test the audio + steps upto install the sample code
Setup new keyword with Snowboy
Long story short the first iteration attempted to rewrite some of the helper objects within the google sample code. That proved problematic when running as both projects use pyaudio to obtain a context to seeed-voicecard. To keep thinks simpler only the files changed are included in the code below. More detail in the readme.
Finally add to /etc/rc.local to run at startup
sudo -H -u pi /home/pi/run.sh > /home/pi/output.log 2>&1 &