Removing Mains Hum

From Librivox wiki
Revision as of 14:41, 23 August 2011 by RuthieG (talk | contribs) (How to install Single Band Parametric in Audacity)
Jump to: navigation, search

What is Mains Hum?

Electrical mains hum is a common cause of annoying background noise. Mains supply in North America is alternating current at 60 Hz; in Europe it's 50 Hz. If the mains induces interference in your recorded signal, then it's at mains frequency and sometimes at the first harmonic of 100 or 120 Hz depending whether you are in Europe or America.

The good news is that 50 or 60Hz are below the normal frequency of the voice, so you can generally remove mains hum without affecting the voice at all. To do this, you need to use a plug-in effect.

Identifying the Frequency of your Hum

1. Ctrl+A and click Effect | Normalize to -2dB.

2. Select about one second of "silence" (hah!) in your recording.

3. Click Analyze | Plot Spectrum

Algorith: Spectrum
Function: Hamming window
Size: 4096
Axis: Log Frequency

You should now see a tall peak. Move your cursor to the centre of the peak and look at the text under the window. If it says Cursor: 49 to 50 Hz (in Europe) or 59 to 60 Hz (in North America), what you have is mains hum. (Note: Your tall peak could be at 100 Hz or at 120 Hz if you have one of the harmonic mains hums happening.)

How to install Single Band Parametric in Audacity

I use the effect "Single Band Parametric" in the Effect menu. You probably don't have this plug-in. It is not installed with the main install for Audacity. This step only has to be done once, and then the plug-in will always be available in the Effect Menu.

There are many plug-in effects available from links on the Audacity site, but for ease of use, I have uploaded the two little files that you need here.

Always virus scan anything you download from the Internet - even from me. :) You cannot be too careful.

Now copy the two files into the Plug-ins folder in Audacity. This is probably at C:\Program Files\Audacity\Plug-Ins. The vst-bridge.dll is just there to enable single_para_1203.dll to work.

Now open Audacity, and open one of your recordings. Click Effect. You have a list of effects, starting with Amplify. At the bottom of the list, you should see Single Band Parametric, which is the effect (plug-in) you have just installed.

NB If you cannot see Single Band Parametric in your list of Effects, you may need to ask Audacity to rescan its information to find it. To do this, click Edit | Preferences | Effects and tick the box that says "Rescan VST effects the next time Audacity is started". Then close and re-open Audacity, and it should now be there.

Using the Single Band Parametric effect to Remove the Hum

A. Ctrl+A to select the whole file. Click Effect | Single Band Parametric. Settings:

  • Gain: somewhere between minus 20-70 dB - the level you need will depend on the strength of the hum.
  • Frequency: the frequency you identified in the last step.
  • Bandwidth: 0.1. The idea is to take out that hum and nothing else.

B. If you look at the Spectrum window again (as in Step 3), you will see that there is a deep notch where that peak was before. If there is still a hum, you may possibly see a secondary peak at a harmonic. If so, do Step A again, but this time using the new frequency.

C. The hum is gone! If there is any hissy white noise left, a light pass of Effect | Noise Removal will do the trick here. Select a small portion of white noise. Click Effect | Noise Removal | Get Noise Profile.

Ctrl+A to select the whole file. Click Effect | Noise Removal again. Settings: no more than 15 dB; 150 Hz; 0.01 secs. Click OK.

Hey presto!