[Speex-dev] noise when passing trougth speex_preprocess

Michele "O-Zone" Pinassi liste at zerozone.it
Tue Oct 11 03:39:57 PDT 2005


Hi all,
as in subject, speex_preprocess inject noise in my data. Someone can help ? 
Here's the way that i'm using:

#define NN 160 /* 20msec di audio */
#define AUDIO_SAMPLERATE 8000

spx_int16_t TEMP_Buffer[NN];
speex_pp_state = speex_preprocess_state_init(NN,AUDIO_SAMPLERATE);
c = denoise;
speex_preprocess_ctl(speex_pp_state, SPEEX_PREPROCESS_SET_DENOISE,&c);
c = agc;
speex_preprocess_ctl(speex_pp_state, SPEEX_PREPROCESS_SET_AGC, &c);
if(agc) {
float t;
t = agc_level * 3276;
speex_preprocess_ctl(speex_pp_state,SPEEX_PREPROCESS_SET_AGC_LEVEL,&t);
}
c = vox;
speex_preprocess_ctl(speex_pp_state, SPEEX_PREPROCESS_SET_VAD, &c);
[LOOP]
/* Convert from 8 bit unsigned to 16 bit signed */
            TEMP_Buffer[tbc] = (spx_int16_t)((int)buffer[c] << 8) - 32640;
            tbc++;
            if(tbc > NN) {
                ret = speex_preprocess(speex_pp_state, TEMP_Buffer, NULL);
	    }
at this point TEMP_Buffer contain original sound *with* noise.

Ideas ? Suggestions ?

Thanks ! Oz

-- 
----
O-Zone ! No (C) 2005
WEB @ http://www.zerozone.it
HOBBY @ http://peggy.altervista.org
Call me with FWD: 692329


More information about the Speex-dev mailing list