DC offset trickery

Q. That audio sample is not a real recording - you synthesized it to have this problem. Does this ever happen with real audio recordings?

A. Yes I cheated :wink: but yes this can occur (though not usually as badly) if a strongly asymmetric waveform is recorded through a sound card that has very poor linearity. It can also occur is a strongly asymmetric waveform is clipped or peak limited.
It may also occur if audio that has DC offset is gated or subject to some “noise suppression” or “recording enhancement” effects.
(All of which amounts to the same thing: non-linear gain).

Q. Is there a solution?

A. The best solution is to use better recording equipment.
If that is not an option, (for example with audio that has already been recorded), use this Nyquist DC offset tool with the options:

  • Remove DC offset
  • Abs + Filter

The track may need to be normalized after processing as the peak level may exceed 0 dB.
[UPDATE: See here for the updated version of the DC offset tool: https://forum.audacityteam.org/t/dc-offset-tool/26679/1 ]

The results can be checked using the code snippet in my previous post.

Note: The Nyquist Nyquist DC offset tool should perform better in cases like this than the LASPA dcremove effect.