Notifications
Clear all

Google AIY voice hat  

  RSS

wsteffen
(@wsteffen)
New Member
Joined: 5 months ago
Posts: 1
2020-05-21 6:17 pm  

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?


Quote
DavidTN
(@davidtn)
New Member
Joined: 2 months ago
Posts: 3
2020-09-11 10:12 am  

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.

  1. Copy the script into the home/pi/AIY-voice-kit-python/src/examples/voice/ folder.
  2. Right click on the python file you just copied. A menu will appear.
  3. Select “Properties” from the menu.
  4. Select the “Permissions” tab in the dialog box that displays.
  5. Change the “Execute” permission to “Anyone”.
  6. 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.

daOrangePeeler commented on Dec 24, 2019  

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":
webbrowser.register('chromium-browser', None, webbrowser.Chrome('chromium-browser'), preferred=True)
(Make sure to leave the spaces from the original line of code in front of the new code segment as spacing matters in Python).

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.

Thanks,

David


ReplyQuote