[Speex-dev] noise when passing trougth speex_preprocess
Jean-Marc Valin
Jean-Marc.Valin at USherbrooke.ca
Tue Oct 11 04:59:10 PDT 2005
Hi,
I (nor anyone else I presume) will not debug your code. However, you can
find help either inthe manual, or by looking at speexenc.c or the
speexclient app at http://people.xiph.org/~jm/speexclient/
Jean-Marc
Le mardi 11 octobre 2005 à 12:39 +0200, Michele "O-Zone" Pinassi a
écrit :
> 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
>
More information about the Speex-dev
mailing list