PulseAudio Setup

Using Snips with PulseAudio

First, add the _snips user to the pulse-access group. In a terminal session on your device, type the following:
1
usermod -g pulse-access _snips
Copied!
Now, list your audio sources, by typing the following:
1
pactl list short sources
Copied!
In the output of this command, look for your microphone:
1
0 alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor ...
2
1 alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ...
3
2 alsa_input.pci-0000_00_1b.0.analog-stereo module-alsa-card.c ...
4
3 alsa_input.usb-OmniVision_Technologies__Inc._USB_Camera.multichannel-input ...
Copied!
Note the id (the first number on the line). Set the microphone as the default sound source as follows, where N is the id of your microphone:
1
pactl set-default-source N
Copied!
Finally, restart the Snips Audio Server:
1
sudo systemctl restart snips-audio-server
Copied!

Using a non-standard mic

You can feed arbitrary input to snips-audio-server, here is an example with arecord:
1
snips-audio-server --nomike --hijack 0.0.0.0:1234 &
2
arecord -r 16000 -c 1 -f S16_LE | nc localhost 1234 &
Copied!
Last modified 3yr ago