Sunday 6 April 2014

Audacity is your friend

Trying to listen through earphones
I can't hear this properly!

Can you speak up, please?

If you have embraced the world of podcasts, you have probably experienced the frustration of having to turn up the volume on a quiet podcast; so much so, that you can hear an annoying electric buzz in the background. If you are listening on a portable MP3 player or mobile phone, you will be running the battery down by turning up the volume so much.

It does not have to be this way - the publisher of the podcast is being lazy by not optimising the audio levels before making the recording public. I have been preparing the podcast for the sermons at our church for the past five years, and I resolved not to publish something of which I was not proud, if I had the capability to do something about it. Some of those audio problems are beyond my control, but volume is an easy one to handle, and I adjust the audio levels on most of the podcasts that I download for my own use as well.

A word of caution - my recommendations here apply to programmes that feature mostly speech. They should not be used on music, as they will alter the overall presentation of the music and spoil its character. Such considerations do not normally apply to speech - where we just want to hear the words as clearly as possible.

If you have the audacity to complain about my recordings ...

Official Audacity icon
Audacity is a powerful open source audio editor. If you are not familiar with it, you can download it from here. IMPORTANT: if you want to re-save your podcasts as MP3 files (which is the whole purpose of this blog page), you must also install the LAME library for use with Audacity - follow the instructions at here. Now, if you have a podcast MP3 file on your computer you can load it into Audacity and see what it looks like. Here is a programme that I have downloaded from the BBC Radio site:
Loading an MP3 file into Audacity
The blue area shows the audio waveform, and the amplitude or height of the waveform indicates its volume. The ideal is for the volume to almost fill the vertical space in Audacity. This file from the BBC is a shocking example - you would certainly be turning up the volume to listen to the programme.

Effect menu in Audacity
There are a whole host of enhancement features that you can use in Audacity - called "Effects" under the Effect menu, but the two that I most commonly use are Amplify and Compressor. Amplify is the simpler of the two features: it uniformally changes the amplitude (or height) of the waveform. You can choose to amplify the whole programme, or a selected portion of the programme. Amplifying selected portions of the programme gives you much greater control, but it is tedious, and unless I am dealing with a particularly difficult recording I prefer to apply the effects to the whole programme simply in order to get the job done more quickly.

When you initially select the Amplify feature, Audacity will propose an amplification level, which is the maximum amount that you can amplify without "clipping" - sending parts of the waveform beyond the bounds of that vertical area in Audacity. Clipping tends to make the sound harsh, and excessive clipping makes the sound indistinct and fuzzy. However, if the recording contains occasional spikes, it can mean that Audacity will not amplify the programme at all without some adjustment. For speech programmes I find that a small amount of clipping is unnoticeable. You can enter a higher value into the "Amplification" box, but you will need to tick the "Allow clipping" checkbox before Audacity allows you to press OK. Often I select a portion of the programme that is free of spikes, select "Amplify", note the proposed amplification level, then cancel the operation, select the whole programme, and amplify by that same amount.

When the programme looks better in Audacity, you can save it again. However, you will need to use the Export option under the File menu - the alternative is to save the "Project" (also under the File menu), but this saves the data in Audacity format, which cannot be used on your media player.

The more complex enhancement feature in Audacity, and more complicated to understand, is the Compressor, also found under the Effects menu. The Amplify effect is best used where the programme has a generally consistent but low volume. The Compressor comes into play when volume across the programme varies more. As for "Amplify", you can also use the Compressor on either the whole programme or a selected portion of the programme. The feature is called the Compressor because it compresses the amount of variation in the volume across the programme, and it is best to experiment in order to learn how to use it.
A programme which would benefit from the Audacity Compressor,
because the volume varies significantly throughout.
Audacity Compressor dialog
The Compressor dialog shows five sliders, and it is difficult to appreciate the impact of each one, so to start with at least, I recommend leaving them at their default settings. The Compressor dialog also shows two checkboxes, which should both be ticked - you will not get the same enhancement effect unless they are both ticked.

For a podcast of any length, it can take a while (a few minutes) for the Compressor to apply its effect once you have pressed OK. When this is done, you will see that the quieter parts of the programme have increased in volume, whilst the louder parts may have been decreased in volume. I often apply the Compressor twice in succession, after which the programme appears as a more solid blue ribbon in the Audacity editor. You can click the Play button at any time to check that the programme has not been distorted detrimentally. Once done, you will need to Export the programme as I have described for the Amplify effect.
A programme that has been optimised for volume in Audacity

Signing off ...

I have only covered the very basics here. I recommend a browse of the manual that comes under the Help menu with Audacity - or, just type "Audacity" into the Youtube search box. In particular, you may wish to adjust the quality of the new file that you are saving - you can adjust the sampling rate (Project Rate) and the "bits per sample" - lowering either of these values will reduce the size of the saved file, and for speech-only programmes any degradation in sound quality will be barely noticeable and vastly outweighed by the positive effects of the Amplification and Compression that you have applied.