Enable acoustic noise (and echo) cancelling feature by default (for Librem microphones)
Open, WishlistPublic

Description

So far, the built-in analogic microphones on most librems have a fair amount of unpleasant background noise, like most laptop microphones.

PulseAudio not only has an excellent/true acoustic echo canceller (not just a concealer), it also has a denoiser. Normally, this is used only when the right module is loaded, and only by native VoIP applications. Therefore, it is not used for WebRTC (ex: PureBrowser) and normal sound recording applications.

There is a way to force it for all applications. I have successfully done so by adding some lines to my ~/.config/pulse/default.pa, but this can be done systemwide, like what we see there.

I think enabling it by default (as part of our packages/patchset) would be a great way to improve user experience. Users are always in control as this only creates a second (virtual) device in the sound control center (or pavucontrol) that they can set as the default recording device.

jeff created this task.Jan 1 2018, 7:32 PM

Mak, once you finish other high-priority tasks please implement this into our defaults. In meantime I would like others to try this patch and report here.

mladen reassigned this task from mak to jeremiah.foster.May 31 2019, 9:50 PM
mladen added a subscriber: mak.
mladen added a subscriber: mladen.EditedMay 31 2019, 10:46 PM

Another solution is to add:

### Enable Echo/Noise-Cancellation
load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0 digital_gain_control=1" source_name=echoCancel_source sink_name=echoCancel_sink
set-default-source echoCancel_source
set-default-sink echoCancel_sink

# automatically switch to newly-connected devices
load-module module-switch-on-connect ignore_virtual=no

to ~/.config/pulse/default.pa or to the bottom of the /etc/pulse/default.pa file.

NOTE: You need to logout and login again or to restart pulseaudio with pulseaudio -k command for the changes to come into effect.

I have this snippet you pasted here at the bottom of my /etc/pulse/default.pa file. It came in via the regular update process on June 4th (I didn't add it manually.)

mladen added a comment.Jul 5 2019, 5:41 PM

Awesome, can we close this now?

Add Comment