This post mostly inspired by a similar one by Be Kuhn. It adds a bit, ignores a bit and is generally much less thorough. My main advice would be to read his post, and come back here if you’re still bored.
My goals are as follows:
Ideally we’d all work in sound-proof chambers, but I currently don’t, I somewhat enjoy being around other people, and I’d like a solution that is somewhat flexible on this point.
No Bluetooth! Too much faffing with connections, too much audio lag and stuff going on. WiFi is more of a mixed bag, and, as the proud owner of a FRITZ!Box, mine isn’t too bad. Pinging the router from my desktop consistently shows a round-trip time of below 4ms, so that’s fine. I’d prefer a fully wired connection, but the BT/OpenReach broadband box is at the opposite end of the house.
One of the reasons I bought a desktop computer was to remove the built-in microphone and webcam. They’re generally garbage (Apple might finally have changed that, but I don’t use macOS) and they’re just two more devices for your VC software to accidentally use. Where I’ve ended up is as follows:
That is the full list of things connected to my computer that can interact visually and sonically (?) with the physical world. (Actually I lie: the monitor also has speakers (permanently muted) and sometimes offers itself to my OS as a juicy audio sink.) It’s not perfect, but it has the right balance of trade-offs for me. I look fine, I sound pretty good, I always know at a glance exactly what the status of my webcam/mic/speakers/earphones is, and I never have to mess around changing devices because there aren’t many and they’re all locked down.
Before I go into the software, a quick digression into some of the other things I’ve tried.
This is where I did a bunch of experiments, and was mostly amazed at how hard this still is to get a decent setup at a decent price. No wonder everyone sounds and looks terrible, and is always plugging stuff in and out!
NB: In case you think I’m some kind of hoarder/Prime-aholic, all of these were second hand (or refurbished) and all were sold on (or returned).
The solution I settled on has no hardware switch for the C922 microphone or the lapel microphone that I actually use, and (with the monitor) there is more than one audio output.
So I wrote a little script that uses PulseAudio (will I have to rewrite this when I switch to PipeWire?) to enforce the setup that I want. The first thing to do is get the “cards” and their available profiles:
pactl list cards
From there you can see the available cards, what their “name” is (as far as PulseAudio is concerned, eg my microphone is called
alsa_card.usb-0c76_USB_PnP_Audio_Device-00), what their Active Profile is, and what other profiles they have available.
After playing around a bit, my script looks something like this:
pacmd set-card-profile $MONITOR off pacmd set-card-profile $C922 off pacmd set-card-profile $AUDIO_JACK output:analog-stereo pacmd set-card-profile $USB_MIC input:mono-fallback
Super-Shift-A to run that script, so I can mash that from time to time and be confident that all is as it should be. But it still doesn’t mute or unmute the microphone, which needs another step (thanks to this blog for some example snippets).
First find out what PulseAudio calls the microphone “source”:
pactl info | grep "Default Source"
Which gives me
alsa_input.usb-0c76_USB_PnP_Audio_Device-00.mono-fallback: just a liiitle different from the card name up above.
Then I added the following line to my script, and every time I hit the shortcut, the world is set right, and the mic’s mute status is toggled.
pactl set-source-mute $USB_MIC_SOURCE toggle
And then! Because I’m using i3 and i3blocks (well, actually Regolith and i3xrocks), I can easily get this status into my task bar thing. This is how it works:
# get the active profile; I also do this for the audio jack, usb mic etc PATTERN='s/.*: \(.*\)/\1/p' LIST=$(pactl list cards) P_C922=$(echo "$LIST" | grep -A50 "$C922" | grep -m1 Active \ | sed -n "$PATTERN" | cut -c1-3) # get the current muted-ness of the microphone MUTED=$(pactl get-source-mute "$USB_MIC_SOURCE" | sed -n "$PATTERN") # basically asserting that the devices are in the state that I want them to be [[ $P_C922 = off ]] && CAM="" || CAM="WARNING cam: $CAMS" [[ $MUTED = yes ]] && MUTED="MUTE" || MUTED="LIVE" # print all the stuff, which should just be either "MUTED" or "LIVE" echo $ACTIVE_C922 $MUTED
And now I have this flashing at me in my system tray whenever I mute or unmute the mic (and generally being loud RED when the mic is hot).