Skip to content

Instantly share code, notes, and snippets.

@andrewn
Last active February 26, 2018 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewn/c9887391124fec06fe9d07f5c17f27e7 to your computer and use it in GitHub Desktop.
Save andrewn/c9887391124fec06fe9d07f5c17f27e7 to your computer and use it in GitHub Desktop.
Radiodan: Configure PulseAudio speaker and microphone
  • Raspbian Lite
  • Create /Volumes/boot/ssh
  • Write wi-fi config to /Volumes/boot/wpa_supplicant.conf

Shell into Pi:

sudo apt-get install git -y

git clone https://github.com/respeaker/seeed-voicecard.git
cd seeed-voicecard
sudo ./install.sh 4mic

sudo apt-get install pulseaudio -y

sudo reboot

Run speaker-test to start pulseaudio

speaker-test -t wav

Find the USB sound card in the list, copy it's name <this-is-the-name> without the angle brackets

pacmd list-sinks | grep -e 'name:' -e 'index' -e 'device.description'

Find the seeed-4mic-voicecard in this list, copy it's name <this-is-the-name> without the angle brackets

pacmd list-sources | grep -e 'name:' -e 'index' -e 'device.description'

Add the USB sound card and mic names as the default sink and source:

sudo nano /etc/pulse/default.pa

Add these to the bottom:

set-default-source alsa_input.platform-soc_sound.analog-stereo
set-default-sink alsa_output.usb-0d8c_C-Media_USB_Headphone_Set-00.analog-stereo

Reboot.

Run speaker-test -t wav again and then pacmd list-sinks | grep -e 'name:' -e 'index' -e 'device.description' again, the * should be next to the USB sound card.

Do the same with pacmd list-sources | grep -e 'name:' -e 'index' -e 'device.description' again, the * should be next to the seeed 4mic.

Recording and playing with defaults should work.

arecord sound.wav
aplay sound.wav

Install radiodan and enloudinator, it should work.

curl "https://raw.githubusercontent.com/andrewn/neue-radio/master/deployment/provision" > provision
sudo bash ./provision
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment