Notifications
Clear all

Google AIY voice hat

3 Posts
3 Users
0 Likes
1,747 Views
(@wsteffen)
Member
Joined: 4 years ago
Posts: 2
Topic starter  

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)
Member
Joined: 4 years ago
Posts: 3
 

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
Ddaved
(@ddaved)
Member
Joined: 3 years ago
Posts: 13
 

I have the assistant_library_demo.py as executable in the src/examples/voice folder. When I type the program name it says: bash: assistant_library_demo.py command not found.

What am I doing wrong?

Thanks in advance for your help.

 


   
ReplyQuote