question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AlexaPi seems to kill googlevoicehat until reboot

See original GitHub issue

Trying to get AlexaPi to work with the new googlevoicehat, and I can hear the audio output through the 'speaker if I run: sudo sox /opt/AlexaPi/src/resources/hello.mp3 -t alsa But whenever I start AlexaPi, I hear no “Hello” message, and any further attempt to play sound results in silence, but with no errors reported. I can only restore sound by rebooting.

sudo /opt/AlexaPi/src/main.py -d outputs: 2017-05-07 19:15:24 DEBUG: Setting up playback handler: VlcHandler 2017-05-07 19:15:24 INFO: Checking Internet Connection … 2017-05-07 19:15:24 DEBUG: Starting new HTTPS connection (1): api.amazon.com 2017-05-07 19:15:25 DEBUG: https://api.amazon.com:443 “GET /auth/o2/token HTTP/1.1” 404 29 2017-05-07 19:15:25 INFO: Connection OK 2017-05-07 19:15:25 INFO: AVS token: Requesting a new one 2017-05-07 19:15:25 DEBUG: Starting new HTTPS connection (1): api.amazon.com 2017-05-07 19:15:26 DEBUG: https://api.amazon.com:443 “POST /auth/o2/token HTTP/1.1” 200 978 2017-05-07 19:15:26 INFO: AVS token: Obtained successfully 2017-05-07 19:15:26 DEBUG: Stopping audio play 2017-05-07 19:15:26 DEBUG: Playing audio: /opt/AlexaPi/src/resources/hello.mp3 2017-05-07 19:15:26 DEBUG: Player State: State.Opening 2017-05-07 19:15:26 DEBUG: Player State: State.Playing 2017-05-07 19:15:26 DEBUG: Started play. 2017-05-07 19:15:29 DEBUG: Player State: State.Ended 2017-05-07 19:15:29 DEBUG: Finished play.

In /etc/opt/AlexaPi/config.yaml I have: input_device: “plughw:CARD=sndrpigooglevoi,DEV=0” output: “alsa” output_device: “plughw:CARD=sndrpigooglevoi,DEV=0”

aplay -L gives me: null Discard all samples (playback) or generate zero samples (capture) pulse PulseAudio Sound Server softvol micboost default sysdefault:CARD=sndrpigooglevoi snd_rpi_googlevoicehat_soundcar, Default Audio Device dmix:CARD=sndrpigooglevoi,DEV=0 snd_rpi_googlevoicehat_soundcar, Direct sample mixing device dsnoop:CARD=sndrpigooglevoi,DEV=0 snd_rpi_googlevoicehat_soundcar, Direct sample snooping device hw:CARD=sndrpigooglevoi,DEV=0 snd_rpi_googlevoicehat_soundcar, Direct hardware device without any conversions plughw:CARD=sndrpigooglevoi,DEV=0 snd_rpi_googlevoicehat_soundcar, Hardware device with all software conversions

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Noiprox6commented, May 28, 2017

I had the same problem using the Google AIY Kit and AlexaPi. I’m using the image from the AIY kit and then installing AlexaPi. I finally tracked it down to this:

https://github.com/alexa-pi/AlexaPi/wiki/Audio-setup-&-debugging#pulseaudio

Specifically the “External DAC Support” section. What wasn’t explained by Google with the kit was that the Google Voice Hat uses an External DAC which uses GPIO pins to communicate with the Pi. So when AlexaPi starts it attempts to setup optional buttons on GPIO pins and conflicts (kills) the Voice Hat audio.

I did as explained in that article and used the “dummy” platform (device: “dummy” in the config file) instead of “raspberrypi” as you would expect as the “dummy” platform doesn’t use GPIO pins for optional buttons so now there is no conflict. Now I can run both AlexaPi and the original AIY project at the same time and both work perfectly. AlexaPi even uses the Speaker from the AIY kit however I didn’t get it working with the Voice Hat MIC, I used a usb MIC and Alexa will respond to her name and Google to the button press from the AIY Kit.

Can’t remember what I used for audio devices in the config files but I think defaults should work once you change the AlexaPi platform.

0reactions
shadowscottcommented, Mar 14, 2018

@Noiprox6 Can you help? I’m trying to do something similar. I installed GassistPi to get Google Assistant working on my Pi without the MagPi image which works fine (despite not realizing it doesn’t have all the play features I was hoping for). However I’m not sure how you got AlexaPi to use the AIY Hat installation. Did you just install it and then change information in the config.yaml for the settings to be ‘default’ to use the built in speaker?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - AlexaPi seems to kill googlevoicehat until reboot -
Trying to get AlexaPi to work with the new googlevoicehat, and I can hear the audio output through the 'speaker if I run:...
Read more >
MIC+ installation guide - Raspiaudio
Then reboot, if you push on the button you can ask an important question to Alexa: How to break appart the microphone (obsolete...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found