I'm aware that the best option for noise cancelling is to buy myself a pair of noise cancelling headphones...

But is there any software available that would use the pc mic and headphones to block background noise?

  • its not possible ! – joe Oct 28 '09 at 9:35
  • Sorry, nothing new exists, except for cheaper noise cancelling headphones. – harrymc Sep 11 '12 at 7:23
  • If you mean noise reduction, this question could be relevant: superuser.com/questions/274604/… One answer mentions some software, of which SoilCall Pro does work (at least to reduce most of the noise I had), but has some sound quality issues. – Qtax May 5 '14 at 22:22
  • YES THERE IS.. better quality too. audacity, 20 seconds after your recording you pass another step 4 clicks and the noise is gone... quote: The noise removal plugin is pretty good, too. Select a segment of audio that's pure noise, then you bring up the noise remover and tell it to "get noise profile. – aliential Nov 29 '17 at 13:45

There are basically two methods for noise suppression

  1. Noise suppression using Wiener-filters or other estimation-and-subtraction schemes. In order to make these sound good, a lot of optimization and brainpower is needed, though. For your application, this is probably not a good solution, since PCs are not built for real-time audio processing, and the algorithms involved are far from trivial.
  2. Playback of latency-corrected, phase-inverted background noise together with the usable signal. This works rather well for headphones, although it does usually introduce some smearing in the basses. However, this, too, does not work offline as it needs the actual background noise signal from the surroundings. And it is not very usable for PCs since they introduce too much audio latency. You could try this with some minimal realtime-Linux-kernel, though.

Based on my experiences with audio processing and various noise cancellation techniques, I would recommend some good sound-insulated headphones. Typically, these will result in better sound without the necessity of any signal processing tricks that won't work too well anyway.

  • 4
    So, in summary, if software for this purpose did exist, it wouldn't be very effective :( . Unfortunate. – Alterlife Nov 25 '09 at 13:19
  • as mentioned getting a nice set of headphones would make a huge difference both in general sound quality and in noise blocking. that means the type that covers beyond the ear not the ear bud type speakers. a relitive of mine got me some really nice ones one time as a present and i was astonished at the difference. – Kendrick Sep 16 '12 at 1:17
  • I wonder if software could work for those annoying repeating or consistent background noises that mess up your hearing. "...chronic exposure to sound even when it is not particularly loud, can wreak havoc on hair cells, causing them to become disarranged and to degenerate." well.blogs.nytimes.com/2013/03/25/what-causes-hearing-loss – ekangas Dec 1 '13 at 2:12
  • I found this recent article (Jan 2013) on predictive noise cancellation filters after a Google search. Although, the article was published in IET Signal Processing, ranked only 27th on scimagojr.com for Signal Processing. iem.kug.ac.at/fileadmin/media/iem/projects/2013/… – ekangas Dec 1 '13 at 2:44
  • 1
    @ekangas this is an implementation of (1). These filters work pretty reliably in well-defined non-changing circumstances, but they require non-trivial processing power and they are hard to get right if the noise is non-stationary. As I said in 2009, a good pair of noise-insulating headphones is usually the simpler and cheaper option. They work great for teleconferencing setups, though. – bastibe Dec 2 '13 at 11:57

Not possible for physical/hardware reasons.

Noise canceling headphones work by recording sound and playing a phase inverted sound to cancel it. With a laptop the mic first off sucks, and nicely in front of you this means sound coming from behind you will reach your ears first before it even hits the mic. Then it has to go through the computer onto the slow soundcard (likely a ping of .1 seconds or more) to the speakers where it'll play. This lag time will be too great to deal with.

So it comes down to mainly this:
You and the mic hear different things (in headphones they are in your ears).
Lag time from standard laptop sound cards is big, you often can't even get a guitar amp working well for this reason over your computer (near 0 in the headphones).

This would, no matter how optimized result in a horrible experience.

  • Yes. It's not for nothing that NC headphones put their microphones right in the earpieces, millimeters from your ears. As a long-ago critic of an early proposal for active noise cancellation said, "it would be impossible to arrange the phase", at least in the higher frequencies, if they were much farther away. – Jamie Hanrahan Apr 1 '17 at 5:09
  • 3
    btw, active noise cancellation is a lot tougher than you might think. If you have a component stereo with an FM tuner, you can demo this: Set your tuner to "mono", and reverse the polarity of the connections to one of the speakers. Notice how much cancellation you do NOT get. Move the speakers right next to each other, but still in the same plane - there still won't be much cancellation. It isn't until you set the two speakers directly facing each other, and as close together as possible, that you'll get much cancellation, and even then you'll likely be surprised at how incomplete it is. – Jamie Hanrahan Apr 1 '17 at 5:28

See this article : Noise Cancelling in Software?.

It's interesting, but has no solution.

  • 2
    The erticle is from 2005. Maybe it's not relevant anymore. – Snark Oct 28 '09 at 9:03
  • 1
    Most data in it seems universal. – harrymc Oct 28 '09 at 9:19
  • I actually have seen that! Google is a wonderful tool :-) . Unfortunately it's a hardware solution... I'm hoping for a similar software solution. – Alterlife Oct 29 '09 at 12:11
  • Very nice 'back of the envelope' calculation by the user that answers at that forum. Nice useful link. Having that explanation in your own wors in your answer would be even nicer. – Leo Jul 30 '16 at 15:35
  • @DaveM It's a community wiki answer. Feel free to update it yourself instead of commenting. – DavidPostill Aug 6 '17 at 11:39

It's not actually noise cancelling but Chatterblocker can help you mask/ignore external sounds.


Using MATLAB and this guide / sample code:


you could record the noise you are trying to cancel (to a wav) and build an audio output that would cancel it. You might also be able to modify the code to take the mic input as the noise and have it adaptively generate the output and play it out.

Keep in mind noise cancellation works best with low frequency "mechanical" type noises. High pitch (high frequency) noises are much more difficult to cancel.


It should be possible for a constant sound (eg: fan bearing whine), but as other pointed out, for regular variable sound background environments, it surely won't work well with common hardware and software.

I also strongly doubt the software would have any reliable way of measuring the lag with high precision (for calibration), which is crucial for sound cancelling waves. (Edit: except maybe for doing manual calibration of phase.)

Regular kernels not being real-time also means that the audio lag can vary a little, which will also throw off any working noise cancellation.

Although computers can record and play sound, they were never designed to have the precision and definition necessary to cancel sound waves.

Implementing such a system on PC software might result in something which might increases noise instead of reducing it, so is avoided.

It still remains one of these topics which lend themselves to research and experimentation, even if just for the pleasure of it :)

Also, high end microphones and professional sound hardware can make a lot of difference.

Source: self proclaimed expert in everything.


If the sound you need to cancel is consistent, for example inside an airplane or the hum of a factory, it seems like the computer's lag shouldn't matter, because the sound is the same no matter how late it arrives. The key would be to accurately phase shift the resulting sound in your headphones. For example, one might try adjustable phase shifting software such as on http://freemusicsoftware.org/category/free-vst-effects-2/phase-shifter

You could even record the background noise and then replay it. You would have to adjust the phase until it was the opposite of what your ears hear directly.

If the poor laptop mic was an issue, you could bring along a used SM58 with you cheaply enough.

Any feedback on this idea?

Not the answer you're looking for? Browse other questions tagged or ask your own question.