Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble setting up Google AIY Voice Kit and solutions. #115

Closed
ConorIA opened this issue Aug 11, 2019 · 15 comments · May be fixed by #138
Closed

Trouble setting up Google AIY Voice Kit and solutions. #115

ConorIA opened this issue Aug 11, 2019 · 15 comments · May be fixed by #138

Comments

@ConorIA
Copy link
Contributor

ConorIA commented Aug 11, 2019

I'm running Picroft on a Pi 3B. I built it following image_recipe.md. I ended up pulling down a buster image of Raspbian as it was the image linked to "latest".

I am using the Google AIY voicehat and I ran into some problems that I thought that I would share.

  1. The Google AIY DKMS module didn't want to build. It turns out there is an issue with the source code that prevents it from building on newer kernels, as outlined here: Error! Bad return status for module build on kernel: 4.19.42+ (armv6l) google/aiyprojects-raspbian#627. There are some manual changes that should fix the issue, but I couldn't get it to work. In the end, I managed to install using a patched .deb file linked to in the comments. Re-running the AIY setup stuff then seemed to work.

  2. The AIY-asound.conf file wasn't pulled in as part of the Mycroft install (I guess I pulled master). I copied it over manually, but was running into an error: amixer: Unable to find simple control 'Master',0. I managed to fix this by replacing the first line with options snd_rpi_googlemihat_soundcard index=0, which is slightly different from the code in AIY-asound.conf. (source)

And finally, this isn't specific to Picroft, but everytime I re-install picroft I have trouble with raspotify, so, in the interest of future me, I wonder whether the following can somehow be implemented:

  1. add the following to /home/pi/.config/pulse/default.pa.
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
  1. add the line default-server = 127.0.0.1 to /var/cache/raspotify/.config/pulse/client.conf.

If there is a more elegant way to address the above, I am open to it. I would be interested to know how Spotify is implemented on the Mark I.

Anyway, I am not sure if any of the above is known and has been fixed outside of master, but I thought I would share my experience FWIW.

@andlo
Copy link
Contributor

andlo commented Aug 24, 2019

I just got a Pi4 and were thinking on trying this with Mycroft. First look into making a Picroft image based on Bustner and not Stretch, and then looking into getting the Google Hoicekit working on that.
Glad I am not strating from scratch and that you have something cooking alreddy :)

@andlo
Copy link
Contributor

andlo commented Aug 24, 2019

I didnt have any trouble or issuet setting up the AIY on picroft on bustner...Well the asound.conf were missing and thre were some errors durring install, but after it booted it worked….
So I lookinto the errors and hopefull soon gets a image that should install picroft and the AIY.

@andlo
Copy link
Contributor

andlo commented Aug 25, 2019

well some troubles…..The audioservice hangs after a short while. Have to investegate. It did that on the stretch to in "old days" but cant remember what were the issue.

@andlo
Copy link
Contributor

andlo commented Aug 28, 2019

Solved the problem ith audioservice hanging just by updating raspbian.

sudo apt-get update 
sudo apt-get upgrade

So my picroft image based on bustner is working fine with the voicekit (v1)

@ConorIA
Copy link
Contributor Author

ConorIA commented Aug 28, 2019

Hi @andlo, great! I was having that issue too, so glad to see an upgrade fixed it. I'll try that when I get a chance to tinker.

@penrods
Copy link
Contributor

penrods commented Nov 13, 2019

Try the latest https://mycroft.ai/to/picroft-unstable image. I think the setup is clean now and works with Pi 3/3+/4 and with the AIY hardware.

@ServError
Copy link

ServError commented Dec 2, 2019

It seems that some of the common issues encountered with the AIY installation have been addressed in a new release of AIY Projects as per google/aiyprojects-raspbian#643

@krisgesling
Copy link
Contributor

I just heard from a user that they needed to install @andlo's AIY Hat Skill or else any speech from the device would be cut off after a few seconds. Is that other people's experience currently?

@ConorIA
Copy link
Contributor Author

ConorIA commented Dec 23, 2019

I was experiencing that when I first opened this issue. The Pi I was using has since been repurposed, so I can't speak to current function. It might be related to the audio service hang described by @andlo, above.

@jannewmarch
Copy link

I just tried installing raspbian-buster_Picroft_2019-11-10 (Stable 19.8.5) and it has the problem referenced by ServError (google/aiyprojects-raspbian#643): aiy-dkms won't build on later Linux kernel. Seems the problem might be solved in aiyprojects but hasn't found its way into the Picroft image. BTW, the unstable image as at Dec 28 is the same as the stable one so no point trying that at present!

@ServError
Copy link

ServError commented Mar 29, 2020

It's pretty straightforward to manually use the new repo until the fix makes its way in. Flash the image, boot it up in your Pi and either connect ethernet or use the wizard to set up wifi, then connect over SSH (or if you really want, do this over nano on the pi), and modify auto_run.sh.

Enable the code to install aiy-python-wheels ( by uncommenting it (removing the #) around line 342

Near line 332 should be the existing code to add the google AIY packages and add the apt key. Replace those two lines with these 3.

echo "deb https://packages.cloud.google.com/apt aiyprojects-stable main" | sudo tee /etc/apt/sources.list.d/aiyprojects.list

curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

sudo apt-get update # this one may be unnecessary

and save it and reboot the board. Once you're up and running, finish the wizard and then manually install the Google AIY kit skill if necessary. Everything should work.

@ServError
Copy link

ServError commented Apr 15, 2020

@andlo I see the new repo has made its way in to the build via your commit. Could you re-enable aiy-python-wheels as well since it's been fixed and can close out this issue?

@andlo
Copy link
Contributor

andlo commented Apr 16, 2020

@ServError I will do that as soon I can. You could however also if you like make a PR your self. It is always exciting to make PR's to a project. One of my first PR's were actualy adding support for AIY on this project.

@ServError
Copy link

@andlo hah, fair enough, I figured a one line change wasn't worth a PR, but I'll put it in.

@ConorIA
Copy link
Contributor Author

ConorIA commented Oct 30, 2021

I am closing this issue as it has been a long time since I wrote it and I think that all of the issues / tips in this issue are ancient history. The only exception is that I still seem to require the workaround to use pulseaudio TCP on localhost in order to have sound from raspotify. Is anyone else using raspotify in picroft and have a better solution? @forslund maybe?

@ConorIA ConorIA closed this as completed Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants