I am working on using my Pi Zero to create a Google assistant. I have a usb sound card and usb mic that I would like to use, but I am not sure exactly how I need to modify asound.conf or if there is anything else that I need to do.

I have been following this basic instructable: http://www.instructables.com/id/Hands-Free-Google-Assistant-for-Raspberry-Pi/?amp_page=true for the most part, but am having an issue with this part.

I am not sure if it matters, but I am also using a usb hub.

1 Answer 1


You need to find what sound devices are available for recording on your Pi, to do that use the arecord -l command. For example on my system it shows like this :

pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: audioinjectoroc [audioinjector-octo-soundcard], device 0: AudioInject-HIFI cs42448-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I can see that I have "device 0" as my only option. If you have the onboard audio and the USB sound card then it is possible the USB input will be "device 1".

If your USB device is device 1, then you will want to setup a default device for card 1 like so in your .asoundrc :

pcm.!default {
       type hw
       card 1

ctl.!default {
        type hw
        card 1

If your card is card 0 then make the necessary changes to this code snippet above.

If you want to use the USB as the input and the onboard device as the output, you will want to setup an asym default as specified in this answer on stack exchange.

Finally it may be better to use a single card with onboard microphone and playback for certain reasons, of which there are some examples on eLinux here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.