How to enable noise suppression in Ubuntu 14.04? [duplicate]

I'm trying to use a 3.5 jack microphone in Ubuntu 14.04, the problem is that Ubuntu doesn't have noise suppression by default, so I got a very loud static noise.

  • I installed libwebrtc-audio-processing-0 and libwebrtc-audio-processing-dev and tried to activate it using pactl load-module module-echo-cancel aec_method=WebRTC, but I got an error:

    Failure: Module initialization failed

  • I also tried to enable it in /etc/pulse/default.pa with:

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

    But it makes the sound applet crash, and doesn't work anyway.

How I can make this work?


First off, let me tell you my qualifications: I have a degree in electronic engineering, a degree in audio engineering, and 23+ years experience doing both and as an IT professional. I say this not to brag, but so you will understand what qualifies me to give the advice I'm going to give you.

The very first thing I'd tell you to do is try the microphone on a different device or computer - one that you KNOW for a fact works, preferably in the same location that you are trying to use the system that has the problem. That will eliminate the mic and location as possible causes of your problem. Since you are using the standard headphone-style jack, I can tell you that things like florescent lights are picked up by the cord like an antenna, and they are VERY noisy. The microphone's cable should be shielded, but often times they are not, and this allows EM noise (like that from the aforementioned lights) to be picked up and converted to audio noise far more easily than many people realize.

Also try recording with nothing plugged in to the card (no sound source). That will make sure the recording circuits and driver of your sound card aren't the issue. If you are using a player of some kind instead of a microphone, you may be sending too strong a signal in, especially if you don't have separate microphone and line in jacks. Sending a line-level signal into a Microphone input will cause severe distortion that sounds a lot like static. If this is the case, turn the volume down - WAY down - and pray you haven't blown the input on your sound card.

It's possible you don't have exactly the right driver for your sound card. Playback, which is (of course) the most commonly used section of a sound card, is far easier to develop a driver for (or so I'm told - I'm not a programmer) because so many of them use the same DAC (Digital to Analog Converter) chip. It is also more forgiving of minor variations from card to card because the conversion from digital to analog is so basic and straight forward, electronically speaking. As long as the data gets to the DAC properly, there isn't much more for the driver to do, and that is more or less done the same way by all sound cards, so a generic driver works pretty well for that side of things.

Recording is a far more difficult process because ADC (Analog to Digital Converter) chips are more expensive and therefore more varied from card to card. The noise you are getting can EASILY be caused by the recording circuit of your sound card not being initialized properly due to the wrong driver. If you can't find a driver for your exact sound card, try to find an old Sound Blaster 16 (or compatible) card and put it in your system. The system will have the proper driver for that built in since it's such a standard in the sound card world.

Good luck!