Detailed Audacity Noise Removal

From Librivox Wiki
Jump to: navigation, search
Note: this article is meant as a starting point. It's not meant to be a deeply technical article, but is meant to provide practical tips for reducing the effects of noise in your recordings. Some background is given to make it easier to understand why the tips work. These are things I know to be true, but they may not be the whole truth. I'd encourage anyone who has more information to add it here.

Contents

Intro

What is noise? Noise is nothing more than unwanted sound in your recording. Signals from microphones are very small, much smaller than the signals that are output by a music player, so every digital recording system will have at least the following components:

  • microphone
  • amplifier
  • analogue to digital converter
  • storage

Every stage except the last will add some noise. Any noise captured before any amplification is also amplified along with the signal. That means that our key strategy for removing noise from recordings is:

Make the signal as large as possible, relative to the noise, without going so far that you get clipping.

The less you have to amplify, the smaller the noise component of your recording will be.

For example, if the loudest part of your signal is at -10dB and the noise is at -70dB, then you will want to amplify by 10 dB to get your signal to 0dB (which is standard). That will raise the noise levels to -60dB, which is all but inaudible. If the loudest part of your signal is much quieter, say -40dB, then you will need a lot more amplification to get a decent output level, namely 40dB. That amount of amplification will raise the level of the noise to -30dB (-30 = -70 + 40) which is much more audible and intrusive. It sounds about as loud as background noise in an office.

This is why you want to record in as quiet an environment as possible. Tips to make things quieter:

  1. use battery-powered equipment (tends to eliminate mains hum, too)
  2. close doors and windows
  3. choose rooms with soft furnishings
  4. avoid tiled rooms, or other large expanses of hard surfaces, which tend to be echo-y

Tips to increase the voice signal:

  1. get closer to the microphone, but not so close that the air current from your mouth directly hits the microphone
  2. use a condenser microphone, rather than a dynamic, or electret

Removing noise in Audacity

So now that we know that recording some noise is inevitable, especially in the non-profession situations in which most of us record, how do we get rid of what we have but don't want?

To get Audacity to remove noise, you must first show it what your noise sounds like, and then Audacity separates your recording into noise and non-noise components. Then it reduces the contribution from the noise component. It would be nice to get rid of all of the noise component, but unfortunately it's not so easy to precisely identify the noise component. The noise that we show to Audacity is an example, not a definition. Audacity can only remove the part of the signal that looks like the example. We have sliders to tell Audacity how lenient or severe it should be when it is deciding whether some part of the recording looks like the example.

This means that it is vital to capture some noise without any other signal. That is commonly called room tone, or room noise. It's also useful to have as a source to replace other unwanted signals, instead of zeroing the recording, which sounds unreal. As we Librivoxateers ought to be adding 5 or 10 seconds of silence at the end of our recording, that is a perfect opportunity to gather some room tone.

How much reduction? OR Using the noise removal dialog

First select a section of the example noise. You don't need a huge amount, but it's helpful to have a few seconds. Make sure that the room tone is the only sound in the recording. No clicks, no breathing, no page turning, nothing except room tone. Select Effects > Noise Removal... and then hit the Get Noise Profile button. That tells Audacity what the noise looks like.

Next, I like to select a section of the file that has some silence and some voice. We'll use this to experiment with to find the right settings for the sliders. It doesn't need to be very long, say about ten seconds. We're only going to use it to Preview the settings, so it doesn't have to include the whole file.

Select Effects > Noise Removal... again, and set the sliders to their first position. If you've done a recording in similar circumstances before, then you might as well start with the same settings that worked well last time. If not, just put the sliders in the middle of their ranges. That means 24 dB for Noise Reduction, 500 Hz for Frequency Smoothing and 0.50 seconds for attack/delay time.

The Noise Removal process has a stronger effect when the Noise Removal slider is further to the right. Hit the Preview button and listen to the effect. If you want to compare it to the original, then slide the Noise Removal slider all the way to the left (0 dB) and listen again. Make sure you listen both to the silences and to speaking passages. You're trying to make the silences as silent as you can, but if you go too far, then the speaking sounds metallic or hollow. Push the slider further to the right to make the silences quieter. Push it further left to reduce the metallic effect on the voice. When you find the best compromise, then you can start looking at the other sliders.

These are different from the Noise Removal slider, as their effect is more aggressive the futher left they are placed. See what happens as you move them to the left. Start by moving them a long way so that you can really hear the difference. I find the effect of the attack/decay slider easier to discern. With a higher value of this slider you'll hear the sound change over the first few instances of silence or voice. That is, when the voice goes silent the noise will appear, and then be damped down. Then when the voice comes back, its character will change after a short while as the noise is removed from the voice. I find it's usually best to keep this slider down below 0.1 seconds. I tend to end at about 0.07 seconds, as that is where it sounds best for me. But you will have to determine the best position for the slider for yourself, as it will vary with your recording equipment, and the type or amount of noise that is in your recording. Just remember to start with big adjustments, then gradually make them smaller and smaller as you zero in on the best place for the slider. It's a good idea to try to go too far, and then come back, in whatever direction you are moving.

Finally, let's look at the Frequency Smoothing slider. I like to think of the noise removal algorithm as a sort of cloth that selectively covers up the noise. It looks a bit like a lacy doily, with holes. If the Frequency Smoothing slider is towards the left hand end, that corresponds to a really delicate lace. It will apply only the very lightest pressure to the signal, so it must have a really good example of the noise to do any good. On the other hand, if the slider is over to the right, then the lace is the opposite of delicate; it's more like a few holes cut out of a piece of writing paper by a small child. It will remove the noise, but it will probably take a lot of the signal with it. If our example of noise isn't very good, then we can't get away with using precise, delicate noise removal, so we have to be more heavy handed. Again, experiment until you get the best results you can. You want to be as far left as you can, while making the silences as quiet as possible but without destroying the character of the voice.

With the two lower sliders now set, you'll probably find that you can go back to the Noise Removal slider and push it a bit further to the right. In fact, if you have a good recording, and a good sample of noise, you'll find that you can push the Noise Removal slider much further to the right than you might have thought possible. The goal is, however, to get your recording to sound as good as possible, not to push the slider as far right as possible.

Now that you have the sliders all set to their optimum positions, cancel the dialog, select the entire audio and apply Noise Removal to the new selection.

When to do noise removal

Some people prefer to edit first and then remove the noise, because the smaller the file, the less time it takes to do noise removal. I prefer to remove the noise first, however, for two reasons:

  1. I save a FLAC version of the file straight away, after I remove the noise, but before I do any editing. This means that everything I recorded has had the same noise removal process applied to it, so it all sounds as though it comes from the same recording. I have had to re-edit more than once, and it is a comfort to know that I can just grab some sound from the original un-edited recording and drop it into my edited file and it won't sound out of place.
  2. The noise cleaned FLAC file is smaller than an uncleaned file would be, so it saves storage space. If I used MP3, that wouldn't be true, but it is true for FLAC. See below if you're interested why.

Other techniques for noise removal

There are other ways to remove noise, but I don't use them, so I don't want to write about them here. Other ways include:

  • Low cut filter, which removes quiet sounds such as breaths. Beware! it leaves you with a completely silent signal except when you're speaking, so not always a good thing if you want to use computational methods to remove noise. ("Low" refers to low amplitude, not low frequency.)
  • A high pass filter removes all low frequency sounds. A lot of noise tends to be at a frequency lower than vocal frequencies, so that can help. I don't think it's worth it, unless you don't have access to the Noise Removal in Audacity versions#3 or later. (Noise Removal in earlier versions of Audacity isn't very good, so it might be better to use a high pass filter.)

Saving space

Noise wastes storage.

Try this experiment: Record some audio. Save it in FLAC (lossless) format. Note how large the file is. Now run your best noise cleaning over that file, and save it in FLAC again, in a different file. The second file will probably be smaller than the first. The reason is that noise is hard to compress.

MP3 is a lossy compression algorithm. A 5 minute track compressed to MP3 at 128kbps will always be exactly the same size. If your track is noisy, then the number of bits devoted to storing your voice will be reduced. Lower bit-rate MP3s sound worse than higher bit-rates. Definitely to be avoided.

Personal tools