Google AIY voice hat
In the video 'hacking the AIY voice hat part2" there is the trafficlight.py code which when I run it it aborts on the line: import aiy.audio. the message is: aiy.audio not found. What am I missing/do wrong?
I need help with the two demo scripts as well. I followed these instructions from the tutorial and updated the path to the new file locations (home/pi/AIY-voice-kit-python/src/examples/voice/) but the scripts just open/close.
- Copy the script into the home/pi/AIY-voice-kit-python/src/examples/voice/ folder.
- Right click on the python file you just copied. A menu will appear.
- Select “Properties” from the menu.
- Select the “Permissions” tab in the dialog box that displays.
- Change the “Execute” permission to “Anyone”.
- Click OK to save the changes.
I'm using a 4GB Pi 4 with the November 2019 AIY build. I couldn't get any other image to even boot on the Pi 4.
I also encountered an issue where the credentials screen wouldn't pop up. That was solved by updating the auth_helpers.py file with the information from this thread.
I fixed the error for my setup with the Raspberry Pi 3B with AIY Voice Kit v1. In the file "/home/pi/AIY-projects-python/src/aiy/assistant/auth_helpers.py", I changed the last argument in webbrowser.register() (line 75) from "-1" to "preferred=True".
Here is the documentation that explains the options for webbrowser.register(). It looks like in Python 3.7, the webbrowser.register() "preferred" argument only takes keywords now.
Here is the full, edited file. GitHub wouldn't let me upload the file directly, so the file is on Google Drive.
Or, if you just want to edit the code directly, here is the new code for line 75 in the file "/home/pi/AIY-projects-python/src/aiy/assistant/auth_helpers.py":
Please let me know if it works or not, or if you have any questions.
I would appreciate any help getting the two demos running.