[vox-tech] noise removal with sox?

Shawn P. Neugebauer vox-tech@lists.lugod.org
Tue, 30 Jul 2002 22:42:41 -0700


I've not used sox before, but it looks cool--lots of basic DSP stuff.

Here are a few suggestions:
- if fan noise is within the same frequency band as the voice, it will be
  difficult to remove only the noise using sox.  you would need more
  sophisticated tools.
- if you can't tell just by listening, you can get an idea of where, in
  frequency, the noise is located but using a spectrum analysis tool.
  for example, xmms has a spectrum analyzer.  there are others.
  if you can find one that is used for analysis, rather than for pretty
  pictures of music, you'll get more information from it.  a spectrogram
  (frequency, vertically, vs. time) will be particularly useful for visually
  identified constant- or periodically-varying noise/interference.
- hopefully, the noise is either very low in frequency (few hundred Hz) 
  or relatively high in frequency (>> 4 kHz).
- if the noise is high in frequency, try the "lowp" or "lowpass"
  options with a frequency that is below the noise.  experiment with the
  frequency a bit.  also try the "filter" option:  use a "low" frequency of
  0 (creates lowpass filter); use a "high" frequency that is higher than the
  speech but less than the noise; you could probably use
  the default "window-len"; leave "beta" at the default.
- if the noise is low in frequency, try the "highp" or "highpass" options.
  the "frequency" is a cut-off: anything below it is attenuated.  you 
  could also try the "filter" option (similar procedure to above; see
  man page).
- if the noise is mixed up with the speech, you might still get some
  improvement by bandpass filtering the speech.  use a center frequency
  that is roughly in the center of the speech energy and experiment
  with the bandwidth and other filter options to see if the quality
  improves somewhat.
- you didn't mention the format of the speech data.  you may need to
  use sox to convert a coded format to, e.g., 16-bit linear before trying
  any of these ideas.

if you're getting the impression that this involves a bit of trial-and-error,
you are correct.

if you want more specifics, offer some more detail on the data format,
and do some leg work to look at it in a spectrum analysis program or
using a spectrogram.

shawn.

On Tuesday 30 July 2002 08:59 pm, Ryan wrote:
> Anyone here any good with sox? I'd like to use it to remove background
> noise from a recording (computer fans), but I can't figure out how to do it
> from the man page or google.
>
> I only want to keep the voice, if that helps any.
>
> I'd be willing to use a diffrent program, but I figure there must be a way
> to do it in sox....