[speex-dev] speex_denoise on non-microphone noise (static ?)

Tom Grandgent tgrand at canvaslink.com
Thu Sep 18 11:25:15 PDT 2003



Hi,

I'm not sure how speex_denoise() works, but my solution to this problem 
is fairly straightforward and works well in practice (in a simple VoIP 
program.)  Note that I am also an amateur and am making up some 
terminology here... but I've tested my approach on several noisy 
environments with low-quality mics and it does work well.

Problem: There's usually annoying noise present in a recorded signal, 
which can be attributed to interference from the PC and background noise 
in the user's environment (fan noise is common.)

Assumptions: The noise is regular with respect to time - that is, it's 
steady and ongoing.  It tends not to change significantly in frequency 
or amplitude over a long period of time.

Solution: Subtract it from the signal.  In order to do this, there are two 
steps required: 1) Build an average profile of the noise.  This is done 
infrequently and [currently] triggered by the user.  2) Subtract the 
profile from the signal.  This is done before encoding the signal with 
Speex.

1) Building the profile: I build an "average profile" of the noise in the 
frequency domain.  So the user is prompted to be quiet for a few seconds, 
the noise is recorded, and it's run through the FFT.  The signal is 
averaged (in the frequency domain) over those few seconds to get a "general 
idea" of the noise characteristics.

2) Removing the noise: Before encoding some recorded sound with Speex, I 
run the sound through the FFT.  Then it's a simple matter to loop over the 
frequency spectrum and subtract the noise profile.  At this point it's 
also easy to do simple filtering, so I do a high-pass filter around 200Hz 
or so to get rid of unwanted bass.  Then, I do the inverse FFT to get the 
sound back into the time domain, and I encode it with Speex.  The noise 
is *greatly* reduced.  The difference can really be dramatic.

Drawbacks: Not all noise is regular over time, and this approach is a 
manual, non-adaptive process (for now anyway...)  One person I talk to 
has a monitor which causes annoying noise only when the screen is mostly 
white.  So sometimes I end up asking them to rebuild the profile.

Well, I'm not sure if this is helpful or not, but it works for me.. :)

Tom

<p>Tongbiao Li (tli at viack.com) wrote:
> 
> The problem started with speech detection.  Speech sections are detected
> well.   However, once in a while non-speech sections are also marked as
> speech.  The root was finally traced down to microphone static noise.
> 
> Then I pulled the microphone out. Our system still records noise.  To
> isolate the problem, I wrote a small app just to open the device and
> record raw samples, calls speex_denoise() and outputs both sample sets.
> The noise is still there, with level fluctuating with gain level, unless
> "All mute" is chosen.  
> 
> In the case when NO microphone is plugged in, speex_denoise() smoothes
> the signal and produces smoother (and even amplifies the signal) speech
> like signals.  It seems that speex_denoise( ) is very sensitive to
> static noise.
> 
> For regular speech COMBINED with microphone static (or more precisely,
> the static detected at the microphone plug, or noise from inside the PC
> ... someone help me out here), the noise samples do get suppressed
> compared to speech samples. 
> 
> One observation: many noise sequences seem to have a signature of sharp
> spikes.
> 
> Anyone have a solution of supressing this type of static?
> 
> Thank you.

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Speex-dev mailing list