I know that this is all probably moot at this point, considering that Snowboy will be shutting down at some point in the next 8 months, but I'm posting this for posterity and hopefully for some kind of learning moment. In my journey to get Project Mego up and running, I initially opted to use the Matrix Creator platform and its microphone array to serve as the audio input for the voice assistant. I had hoped to be able to utilize the myriad features on the board for extensions to my setup down the road, but, it seems, I've run into several dead-ends. It is in this article that I shall outline my steps taken in the hope that someone more knowledgeable than me will be able to shed some light on my mistakes.
- First, let's assume that I've installed Raspbian (Stretch, as later versions are not supported by the Matrix boards) and plugged the Creator into the Pi correctly.
- Then, I'll install the Matrix packages
wget https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add - echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.list sudo apt-get update sudo apt-get upgrade sudo apt install matrixio-creator-init sudo reboot now sudo apt install matrixio-kernel-modules sudo reboot now
- Once that's set up, I can verify that the microphone works using arecord and aplay
- Now, I'll setup up a project and install the Google Assistant SDK per Big G's instructions
- With the Assistant SDK set up, I can verify that the demo scripts do work
- Next, I can start to set up Snowboy
- Install dependencies: sox, portaudio, pyaudio
sudo apt-get install python-pyaudio python3-pyaudio sox pip install pyaudio
- Compile Swig
wget http://downloads.sourceforge.net/swig/swig-3.0.10.tar.gz sudo apt-get install libpcre3 libpcre3-dev ./configure --prefix=/usr \ --without-clisp \ --without-maximum-compile-warnings && make make install && install -v -m755 -d /usr/share/doc/swig-3.0.10 && cp -v -R Doc/* /usr/share/doc/swig-3.0.10
- Install Atlas library
sudo apt-get install libatlas-base-dev
- And, again, when I test the microphone with arecord and aplay, it does work
- Clone Snowboy repository
wget https://github.com/Kitt-AI/snowboy.git
- Compile Swig Python wapper
cd snowboy/swig/Python make
Now, I have made it as far as running the demo_arecord.py script in Snowboy. The script does work with any voice model given. The standard demos do not work as I've gathered that the Matrix does not play nicely with pyaudio. This is also where I'm having trouble integrating the Assistant SDK into the Snowboy demo (in an attempt to call Assistant instances with the Snowboy wake word). As a workaround, I attempted to install GassistPi on top of this setup as a way to call Assistant with the custom Snowboy wake word, but the installer script ends up breaking the entire audio setup (I assume because it's built around pyaudio). I've tried installing the package line-by-line and even trying to replace the references to Snowboy's demo scripts with references to the aforementioned "demo_arecord" script, but I can't quite determine where the fault(s) lie.
At the end of the day, I understand that this will all be deprecated in a few months, but I would be curious if anyone else is able to take a crack at the original scope of this project. In the meantime, I'm going to look into more projects I could build off the Matrix platforms!