I spent the last couple of days working on the RaspberryPi Soundboard, and I must say I’m kind of frustrated with Linux Audio. It seems much harder to get stuff working when you want to keep things simpler and not use a GUI.
This is what I’ve achieved.
I have Mumble running from the command line even when no display is connected to the Pi. “Yay!”
I have Pulseaudio running with all the correct settings on the Pi.
The main issue I faced was piping the audio. As much as Pulseaudio is the solution to mix and pipe audio around, letting me pipe audio coming from a player (say aplay or sox) into another application is really difficult. I faced a couple of main issues.
It seem none of the players let you choose which “sink” in Pulseaudio should they connect to. I only saw that option in mpd, but that seemed like a total overkill for what I want to do.
While using Pulseaudio’s sink.monitor feature works perfectly for my streaming server use case, the soundboard has a slightly different needs. Here we need the audio from the player to end up in Mumble. I am envisioning a Pulseaudio configuration along this line.
aplay => Pulseaudio null-stream –> stream.monitor => Mumble.
- Finally, getting Mumble to receive audio from Pulseaudio is straightforward, but to set it to receive it from a monitor of a sink seems challenging. The funny bit was I could easily do it using GUI (pavucontrol) but couldn’t find the command (pacmd? pactl?) to do that.
Any ideas or suggestions would be welcome! Please comment below!