Google Assistant SDK on Raspberry Pi 3: Audio setup does not work

前端 未结 2 1669
长情又很酷
长情又很酷 2021-01-16 07:35

I have been trying to install G assistant in to a Raspberry Pi3. I have question in the following link

https://developers.google.com/assistant/sdk/prototype/getting-

2条回答
  •  隐瞒了意图╮
    2021-01-16 07:54

    That happens if your .asoundrc doesn't have the correct structure. Warning: If you use the rpi gui (desktop) volume control to change inputs it will modify the .asoundrc for you, breaking ALSA for google assistant. You'll have to go and fix it up. The instructions on google's website are correct.

    To fix it delete the new entries created. Then, at the top, look for the line 'type hw'. It has been sneakily modified... you'll have to change it back to 'type asym' to match the config google specify.

    I leave the input/output for the gui (desktop) volume set to analogue and don't touch it once I start using google assistant so it won't go and mess with .asoundrc again.

    I am using a Logitech USB headset and which has both mic & speaker (I don't use external speaker) So, given my audio input and output goes to the headset, my .asoundrc looks like this:

    pcm.!default {
      type asym
      capture.pcm "mic"
      playback.pcm "speaker"
    }
    pcm.mic {
      type plug
      slave {
        pcm "hw:1,0"
      }
    }
    pcm.speaker {
      type plug
      slave {
        pcm "hw:1,0"
      }
    }
    

    Lastly, if you reboot your Pi, you'll have to reset the source path for the assistant binary, otherwise it won't be able to find the command that starts the assistant demo. Do this by typing "source env/bin/activate" Then you can run it again by typing "google-assistant-demo"

    Good luck!

提交回复
热议问题