Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Raspbian Stretch ALSA Config for PyAudio

PyAudio working, but spits out error messages each time

sudo vi /usr/share/alsa/alsa.conf
130 pcm.default cards.pcm.default
131 #pcm.sysdefault cards.pcm.default
132 #pcm.front cards.pcm.front
133 #pcm.rear cards.pcm.rear
134 #pcm.center_lfe cards.pcm.center_lfe
135 #pcm.side cards.pcm.side
136 #pcm.surround21 cards.pcm.surround21
137 #pcm.surround40 cards.pcm.surround40
138 #pcm.surround41 cards.pcm.surround41
139 #pcm.surround50 cards.pcm.surround50
140 #pcm.surround51 cards.pcm.surround51
141 #pcm.surround71 cards.pcm.surround71
142 #pcm.iec958 cards.pcm.iec958
143 #pcm.spdif iec958
144 #pcm.hdmi cards.pcm.hdmi
145 #pcm.dmix cards.pcm.dmix
146 #pcm.dsnoop cards.pcm.dsnoop
147 #pcm.modem cards.pcm.modem
148 #pcm.phoneline cards.pcm.phoneline

Blue Yeti Nano Orange Ring

Set parameters correctly:

  • 2 channel
  • 24-bit
  • 48 kHz
vi ~/.asoundrc
pcm.!default {
    type hw
    card 1
    channels 2
    rate 48000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.