1
$\begingroup$

I am creating a piece of software that detects when speech starts in an audio recording. Before performing onset detection I would like to remove any noise that may cause any false positives. Which would be the best low-pass filter to use for this?

EDIT 1

Maybe I went too far in saying that I am performing onset detection. Basically all I am doing is looking for the first time the amplitude goes above a certain value and taking that as a flag for the start of the envelope. It is simple and crude, but I believe if my low-pass filter successfully removes noise then the onset detection should work. Or am I totally off on this?

$\endgroup$
  • $\begingroup$ Please tell us more about your onset detection algorithm (is it amplitude based? does it use a derivative of the energy? over how many frequency bands?). Some kinds of noise have no impact on onset detection (etc: a constant amplitude white noise in the background). Low-pass filtering might not be the best solution anyway, since high-amplitude, low-frequency spurious signals are possible in some recording conditions, such as a microphone "pop". $\endgroup$ – pichenettes Feb 13 '12 at 18:43
  • $\begingroup$ @pichenettes See Edit :) $\endgroup$ – Eric Brotto Feb 13 '12 at 18:47
  • $\begingroup$ Depends on the noise source. In many speech recordings the dominant noise is low frequency acoustic noise (HVAC, handling etc.). There can be mic noise, pre-amp noise, power supply hum etc. What's your noise like? $\endgroup$ – Hilmar Feb 13 '12 at 19:01
  • $\begingroup$ @Hilmar Wow, okay, I may be a bit in over my head here. The vocal recordings are made with an iPhone in any situation you could possibly imagine someone using an iPhone. I guess I'm looking for a general purpose way to extract the beginnings of speech during such a recording. Maybe I should be rephrasing my question? $\endgroup$ – Eric Brotto Feb 13 '12 at 19:06
  • $\begingroup$ Some high amplitude spurious noises like a temporary shock near the microphone (sounds like a "pop") or a nearby car honking have quite a wide spectrum and will still have a high-amplitude even if low-pass filtered. You need something more sophisticated than your level threshold if you want to be robust to them. What about doing something like "is level above threshold for more than x ms?". Also, are you trying to do offline or online processing? $\endgroup$ – pichenettes Feb 13 '12 at 19:31
3
$\begingroup$

The problem is that for speech, noise and speech may well occupy the same frequency bands, so removing an arbitrary band by simple filtering can remove speech as well, which will prevent your detector from triggering, as well as not removing out-of-band noise, which will produce false positives.

So, what you are looking for might not be just a low pass filter, but a Voice Activity Detection algorithm, which is a more sophisticated bit of DSP technology. There are many research papers on this topic, so it's not a short answer question.

$\endgroup$
  • $\begingroup$ Great info. Thanks! But if I wanted to do a crude version would a low pass filter and some sort of onset detection suffice? $\endgroup$ – Eric Brotto Feb 13 '12 at 21:42
  • $\begingroup$ No. The low pass filter is an ineffective cure for a problem that wouldn't be there in the first place if you used proper voice activity detection. $\endgroup$ – pichenettes Feb 13 '12 at 23:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.