[Speex-dev] Noise suppression less than AGC gain

Thorvald Natvig speex at natvig.com
Tue May 29 06:46:42 PDT 2007

Jean-Marc Valin wrote:
>> I've had a small case with noise suppression and AGC. I have a fairly
>> noisy environment here, and with the default parameters, noise
>> suppression works fairly well while I talk. However, when I shut up, AGC
>> starts slowly increasing the gain until it has amplified whatever noise
>> is left to levels about equal to having no filtering at all. As soon as
>> I talk, AGC backs down fairly quick and the noise is again gone.
> Are you using 1.2beta2? There's been lots of changes in both noise
> suppression and AGC since 1.2beta1. So make sure you use 1.2beta2 if
> that's not already the case.
>> Decreasing the AGC max gain and increasing the ammount of noise
>> suppression fixed things, but it might be an idea to change the defaults
>> slightly?
> It's actually possible to make noise suppression more aggressive, with a
> price in quality. But in the end, it's mainly a matter of making sure
> the AGC does the right thing. After you speak, does the level of the
> noise start going up again?

Ah, apologies, I should have mentioned that. This is against current SVN 
(rev 12997), built on Win32 with mingw gcc 3.4.5 using SSE.

Yes, after I stop speaking, the noise slowly starts climbing again, and 
if I peek at st->agc_gain, that's slowly climbing too. I think part of 
the trouble is that the noise in here isn't uniform white noise; there's 
traffic outside the window and people walking in the hallway outside my 
door. Each little event is enough to cause the AGC to increase a little bit.

If I understood the math behind this, the default noise suppression is 
-15 dB and the default max gain is *30, which should be.. uh. 29 dB? 
Anyway, the point being that the max gain is allowed to amplify more 
than the noise suppression is allowed to suppress.

Alternately, perhaps it could be made so that noise suppression scales 
with agc_gain? (IE, if you're multiplying by 10 for the gain, multiply 
noise reduction by 10 as well).

Although I haven't tested, I imagine a similar case could exist for echo 

More information about the Speex-dev mailing list