Noise/Echo Cancellation in Fedora (26+)

The Minimic is great. I just received mine last week, and I’m loving the ability to join video calls with nice, comfy headphones. It’s much better than switching back and forth between headphones and a headset.

The only problem is that, since the minimic is just a wire, it doesn’t have any noise or echo cancellation. And since Fedora doesn’t come with that feature enabled by default, the mic was picking up a lot of ambient noise. Breddy told me that steps just like the following didn’t work in Fedora a few versions ago, so I wanted to document them now that the issues seem to be fixed. I originally found these instructions on this r/linux post and am reposting them here with Fedora-specific flourishes.

Without further ado, here’s how to turn on noise and echo cancellation in Fedora 26. Update: also works in Fedora 27 (and 28!).

Just gimme it

If you’re in a rush, here’s a script that will set everything up for you.

sudo dnf install -y webrtc-audio-processing
echo '.nofail' | sudo tee -a /etc/pulse/
echo 'load-module module-echo-cancel aec_method=webrtc' | sudo tee -a /etc/pulse/
pulseaudio -k

Again, but with explanation

The first step is to install the WebRTC audio processing package. It may come by default with Fedora. My machine had it installed already, but I’m including it here in case it was simply a dependency of some other package I’ve installed.

sudo dnf install webrtc-audio-processing

Then add these two lines to the end of /etc/pulse/

load-module module-echo-cancel aec_method=webrtc

Then restart PulseAudio.

pulseaudio -k

Now, if you open Sound settings, you should see a new entry under the Input tab. Mine is called “Built-in Audio Analog Stereo (echo cancelled with SA9027 USB Audio Analog Stereo)”. Not sure what’s up with that name; my mic is connected with a 3.5mm audio jack. Whatever, it works!

Select the device that says “echo cancelled” and your audio background hiss should drop to almost nothing. Here’s a before and after spectrum analysis.

Audio spectrum analysis of microphone input without noise cancellation.
Spectrum analysis without noise cancellation.
Audio spectrum analysis of microphone input with noise cancellation.
Spectrum analysis with noise cancellation.