audionormalizationoffsetamplitudeaudacity

How can I Remove a Wandering DC Offset from an Audio Clip?


I've licensed some audio clips, but some of them come with what I have learned is a "DC Offset" that should normally have been removed during production.

Audacity's "Normalize" filter is able to fix a static DC Offset, but after applying it to my audio clips, I noticed that their DC offset varies (within 0.5 seconds it could go from 0.05 to 0.03 along a normalized amplitude range). For example:

Wandering DC Offset

To the left, silence is at 0.02, to the right, it's at 0.00 - this is after normalization by Audacity.

With me not being an audio engineer and not having any professional tools, is there a way to fix this?


Solution

  • A DC offset is a frequency component at 0 Hz. The "wandering DC offset" will be made of very low frequency components, so you should be able to remove this by using a high-pass filter with a cutoff of around 15 Hz. That way, you'll remove any sub-sonic DC related stuff without altering the audible frequency range.

    Use a filter with a steep rolloff. Seeing as you're doing this offline, you can use a simple IIR type and filter the signal in both forward and reverse directions to remove any phase distortion that would otherwise be imposed by the filtering.

    If you use matlab, the operation would look something like this . .

    [x, fs] = wavread('myfile.wav');
    [b,a] = butter(8, 15/(fs/2), 'highpass');
    y = filtfilt(b,a,x);