Voice Interfaces

Google AIY Voice Project


This week, I set up an Google AIY Voice Kit with a Raspberry Pi. While building the box and putting everything together was pretty easy, I actually ran into several issues when trying to run code. Keep reading below to see the process, some code, and a video of it working.

Particularly I continued to run into variations of this message over and over again.

I went through the process of troubleshooting and looking up this segmentation issue. I attempted to update the raspberry pi and change various settings, which ended up not solving this problem. I am honestly not sure what the root cause of the problem was, but I ended up re-flashing my microSD card and only then was I able to get the examples to work.

I ended up setting up my raspberry pi headless (only used my macbook). This is honestly way more convenient that using the monitor, keyboard, and mouse. The only trouble is initially figuring out the raspberry pi's IP address. It's not too bad - you can just plug it into your router with an ethernet cord & then log in to the router to find all the connected device's IP. Then you can ssh into the raspberry pi and set things up as normal. I also used xrdp so I could using my macbook to see the GUI through Remote Desktop Connection. This let me use the terminal to open web browser tabs (:

Following that, I had to figure out Python. Compared to JavaScript it looks like reading a book with no punctuation, but Jim's Python flyby on Friday was so amazingly helpful! I finally was able to understand the logic of the code, however I do think that Google's examples need more comments and explanation! If we have time for that in class I would really like to go through that more thoroughly.

I also had this issue when I created python files using the "touch" command, the files would get a lot of errors. I ended up just copying (use "cp" in terminal) google's example files and editing it from there. Anyways, here is the code where I added some of my own commands.

I ran the command like so:

/home/pi/AIY-projects-python/env/bin/python /home/pi/AIY-projects-python/src/examples/voice/test1.py

And here is what it looks like in action.

Maybe for the final I will use the voice kit to control some physical elements. I was looking at this tutorial to control the GPIO pins, which might be fun.</div>