Displaying 4 results from an estimated 4 matches for "speex_compute_agc".
2004 Aug 06
1
Proposed AGC additions
...agc_max_gain;
In preprocess.h, #defines at the end:
#define SPEEX_PREPROCESS_GET_AGC_GAIN 14
#define SPEEX_PREPROCESS_SET_AGC_MAX_GAIN 15
#define SPEEX_PREPROCESS_GET_AGC_MAX_GAIN 16
In preprocess.c, speex_preprocess_state_init():
st->agc_gain = 1;
st->agc_max_gain = 200;
In preprocess.c, speex_compute_agc(), before last for loop:
if (agc_gain > st->agc_max_gain)
agc_gain = st->agc_max_gain;
st->agc_gain = agc_gain;
In preprocess.c, speex_preprocess_ctl():
case SPEEX_PREPROCESS_GET_AGC_GAIN:
(*(float*)ptr) = st->agc_gain;
break;
case SPEEX_PREPROCESS_GET_AGC_MAX_GAIN:
(*(float*)ptr) =...
2005 Jun 20
1
Speech detection in preprocessor with echo
...oking for. I've made a few simple modifications to the AGC to prevent
it from 1) exceeding a specified level of amplification and 2) enable
and disable adaptation, so I can freeze it at a certain level while
speech is not detected. It's mostly just a matter of doing this at the
end of speex_compute_agc():
if (!st->agc_frozen)
{
agc_gain = st->agc_level/st->loudness2;
/*fprintf (stderr, "%f %f %f %f\n", active_bands, st->loudness, st->loudness2, agc_gain);*/
if (agc_gain>st->agc_max_gain) /* was 200 */
agc_gain = st->agc_max_gain; /* was 20...
2005 Jun 22
1
Speech detection in preprocessor with echo
...odifications to the AGC to prevent
> > it from 1) exceeding a specified level of amplification and 2) enable
> > and disable adaptation, so I can freeze it at a certain level while
> > speech is not detected. It's mostly just a matter of doing this at the
> > end of speex_compute_agc():
> >
> > if (!st->agc_frozen)
> > {
> > agc_gain = st->agc_level/st->loudness2;
> > /*fprintf (stderr, "%f %f %f %f\n", active_bands, st->loudness, st->loudness2, agc_gain);*/
> > if (agc_gain>st->agc_max_gain)...
2006 Feb 03
0
Leaking audio and AGC/VAD
Hi,
The leakage problem you describe is very, very common and you will need
to do something to address it. I modified the version of Speex I use to
implement an adjustable max gain. If you look at speex_compute_agc in
preprocess.c, you will see:
if (agc_gain>200)
agc_gain = 200;
This max of 200 is usually more than enough to amplify leakage which
occurs either in the sound hardware or in a headset to the point where
it is as loud as normal speech.
You can replace this max of 200 with a confi...