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:

usermod -g pulse-access _snips

Now, list your audio sources, by typing the following:

pactl list short sources

In the output of this command, look for your microphone:

0 alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor ...
1 alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ...
2 alsa_input.pci-0000_00_1b.0.analog-stereo module-alsa-card.c ...
3 alsa_input.usb-OmniVision_Technologies__Inc._USB_Camera.multichannel-input ...

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:

pactl set-default-source N

Finally, restart the Snips Audio Server:

sudo systemctl restart snips-audio-server

Using a non-standard mic

You can feed arbitrary input to snips-audio-server, here is an example with arecord:

snips-audio-server --nomike --hijack 0.0.0.0:1234 &
arecord -r 16000 -c 1 -f S16_LE | nc localhost 1234 &