Michele "O-Zone" Pinassi
2005-Oct-11 03:45 UTC
[Speex-dev] noise when passing trougth speex_preprocess
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
Jean-Marc Valin
2005-Oct-11 15:22 UTC
[Speex-dev] noise when passing trougth speex_preprocess
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 >