Friday, May 6, 2011

Cleaning up speech recordings with Audacity

  In the research project that’s currently taking 95% of my time, we had participants think aloud while wearing headsets. It was a nightmare, simply because we were using someone else’s computers. After dealing with their $#%^! security software, I didn’t have time to make sure each computer is configured well for recording. So after the experiment, I was left with a hard disk full of crappy, barely audible recordings.

  Audacity to the rescue. “Audacity® is free, open source software for recording and editing sounds.” It’s an extremely powerful tool, but I’m using it in the dumbest way possible just to clean up my speech recordings. Luckily for me, I stumbled upon a preconfigured option for this.

  Audacity uses a mechanism for batch processing called a chain. A chain is a series of predetermined commands that it applies to an audio file one after another. From the File menu you can edit chains or create new ones, and you can apply a chain to files. When I opened File > Edit Chains imagine my wonder at finding a chain called CleanSpeech. It does some normalization and noise reduction and then saves a copy as an mp3 (All the better to upload you with, my dear). Thanks to CleanSpeech, the process of cleaning up my speech recordings boils down to:

  1. Choose File > Apply Chain…
  2. Choose CleanSpeech chain and click Apply to Files…
  3. Choose my files, click Open and leave the computer overnight to do its thing

  After some testing, I did modify the CleanSpeech chain a little. I got rid of two steps, SaveHqMaster and TruncateSilence. SaveHqMaster saves an mp3 version before the cleaning process. I don’t need that because I’m keeping the original wav files as backup. TruncateSilence supposedly cuts out silent portions of the recording, but I found that in some cases it made the speech choppy or cut some out altogether. I’d rather leave in the silence. Also, running CleanSpeech will require that you install the LAME mp3 encoder that isn’t bundled with Audacity for licensing reasons (you can find it from their instructions or here). I recommend that you try opening a file in Audacity and running CleanSpeech on it (choose Apply to Current Project instead of Apply to Files…). That should pop up the request to install LAME and once you do that you’ll be all set.

  I’m sure there are easier, more efficient, more elegant and all around better ways to clean up a ton of speech recordings and if you know them, please share in the comments. For today, this is what I learned.

1 comment:

  1. There's no easy way, since the voice you're aiming to trap contains several of the frequencies and amplitudes that are targetted by the noise removal algorithm.

    Best is to prevent the noise from getting there in the first place. This is the reason that news cameras are covered by bulbs of foam. And why studio singers have a screen between themselves and the mic.

    If you're trying to wing it with a PC mic, use a sock (the smellier the better.) I take a mid-thickness cotton sock (thick wool and you sound muffled), fold it over twice and stick my PC mic in that. Then I compensate by leaning in very close and singing/talking into the sock. Works a treat.

    ReplyDelete