17

My soundcard is Realtek ALC 892. On Windows 7 I use official Realtek drivers, on Linux I use PulseAudio (on Ubuntu 13.10). On both Windows and Linux, when I enable microphone boost +30db (required because my microphone is quiet), I get very annoying and loud background noise (I also confirmed the background noise with Audacity on both systems).

However, Windows Realtek drivers have noise suppression option which works (after enabling it, Audacity shows no background noise and my ears also confirm that there is no background noise).

Image showing noise suppression option

My question is how can I enable background noise suppression in ALSA/PulseAudio? Is there any module I can install or maybe there is a setting for it that can be enabled in config file?

I can't find solution for it and this is the only thing that prevents me from switching to Linux completely - as I talk using microphone a lot and on Windows the Realtek software removes the background noise completely and PulseAudio doesn't remove it, which means the recorded voice on Linux is very bad.

I know I could buy better soundcard and microphone, but as I said, Windows Realtek drivers remove the noise on software level in real time (ie no noise when talking on TeamSpeak3/Steam/whatever voip programme) so I hope that there is such option on Linux as well.

This is also crossposted on Unix StackExchange

5
  • 1
    Audacity does have an incredibly annoying/useless noise remover... but that can't be used in real-time...
    – Wilf
    Feb 16, 2014 at 14:51
  • @Wilf I know, but I'm looking for real time solution, like the Realtek drivers on Windows. Feb 16, 2014 at 16:24
  • I think that there is nothing as such for linux till now.
    – Amith KK
    Feb 16, 2014 at 16:28
  • 2
    @goldilocks added info on both sites that this is crossposted to make sure there won't be duplicate answers Feb 16, 2014 at 16:49
  • This is a valid question, still I'd like to inquire: how about getting a decent microphone instead, so you don't get such amounts of noise in the first place? A bad microphone will always sound bad, IMO even worse when you use noise filtering than without. Mar 4, 2015 at 9:56

2 Answers 2

18

I use lubuntu and have installed pulseaudio and pavucontrol already. I have managed to fix the problem with my microphone noise by launching skype from terminal: PULSE_PROP="filter.want=echo-cancel" skype

4
  • 1
    Please ask questions in a question box and provide only answers in the answer box. This is a Q&A site. Not a forum. Thank you!
    – Elder Geek
    Jan 22, 2015 at 0:01
  • Worked for me on teamspeak on Arch Linux. This answer needs more upvotes!
    – jordoex
    Jul 6, 2015 at 17:23
  • This also worked for my on standard Ubuntu 15.10 install. It would be good to know how to automatize this parameter.
    – vmalep
    Feb 16, 2016 at 19:52
  • Also working for me (Ubuntu 14.04) Apr 26, 2016 at 20:24
15

A bit late in the day but I recently got similar static background noise issue with my laptop's internal microphone (same Realtek chipset I believe but solution should work for all soundcards). After looking around, there is indeed a way to reduce noise in realtime in pulseaudio using webrtc echo-cancel plugin (the default speex echo-cancel in Ubuntu/Mint did not work well for me). I saw mention of that on PulseAudio Gentoo wiki, but took a while to figure out how to enable in Ubuntu. It made quite some difference for me and the background noise in Skype is now almost all gone.

Luckily Ubuntu already packages the webrtc library required for this. We can compile from the official source applying minimal change to enable the plugin and then install the updated package:

Enable source code repos in software sources, then:

sudo apt install build-essential

# do this if like me you have libjack-jackd2-0 installed and not libjack0
sudo apt install libjack-jackd2-dev

# for jack dependency problem accept the second solution of not installing libjack-dev, libjack0 since we already have installed required dev package above
sudo apt build-dep pulseaudio

# also install webrtc
sudo apt install libwebrtc-audio-processing-dev

# get the pulse source package
apt source pulseaudio
cd pulseaudio-4.0

After this edit the debian/rules file, go to ~line 57 and add "--enable-webrtc-aec" to DEB_CONFIGURE_EXTRA_FLAGS (say after the --disable-hal-compat option)

Next edit debian/pulseaudio.install file and add: usr/lib/pulse-*/modules/libwebrtc-util.so

If you also want the pulse PulseaAudio System-Wide Equalizer, then edit debian/pulseaudio-utils.install and add: /usr/bin/qpaeq.

Then build the package to get the new debs: dpkg-buildpackage -d -us -uc -nc

You should install pulseaudio, pulseaudio-utils and libpulse packages among the generated debs (e.g. for Trusty 64bit release, or Mint 17 64bit: sudo dpkg -i pulseaudio_4.0-0ubuntu11_amd64.deb pulseaudio-utils_4.0-0ubuntu11_amd64.deb libpulse0_4.0-0ubuntu11_amd64.deb libpulsedsp_4.0-0ubuntu11_amd64.deb libpulse-mainloop-glib0_4.0-0ubuntu11_amd64.deb)

Lastly enable webrtc plugin in /etc/pulse/default.pa: sudo gedit /etc/pulse/default.pa

Add the following at the end of the file:

### Load echo cancellation module
load-module module-echo-cancel source_name=echosource aec_method=webrtc
set-default-source echosource

You can also enable equalizer if you desire as mentioned in the webupd8 link above.

After this restarting pulseaudio (pulseaudio -k && pulseaudio --start), or logoff+relogin, or reboot should enable the noise/echo cancellation plugin in pulseaudio. Somehow I found it working well after a full reboot but not so much after just a relogin.

3
  • Could you please help mi with the problem over here askubuntu.com/questions/505824/… Aug 2, 2014 at 15:40
  • Not working for me on Ubuntu 14.04. I get checking for LIBSNDFILE... no configure: error: Package requirements ( sndfile >= 1.0.20 ) were not met: No package 'sndfile' found, even if I should have already installed it $>dpkg -l| grep snd ii libsndfile1:amd64 1.0.25-7ubuntu2.1 amd64 ii libsndfile1:i386 1.0.25-7ubuntu2.1 i386
    – tigerjack
    Jan 20, 2016 at 16:54
  • 1
    This worked great with pulseaudio_8.0 too. I no longer have problems with static noise
    – Thomas
    Feb 17, 2018 at 18:10

Not the answer you're looking for? Browse other questions tagged .