[Speex-dev] VAD in preprocessor

yaseminyilmaz yaseminyilmaz at aytor.com
Fri Dec 29 05:44:52 PST 2006

Hi all and Jean-Marc,


Firstly thanks a lot to you for helps, at last I accomplished to use
speex-1.2beta1 in my speech application. I try to understand speex source
code and improve speech quality. The problem in my application (like many
people in the list says) is noise. So I've added VAD in preprocessor as


int param_enabled = 1;

int param_disabled = 0;

int sampling_rate = 8000;

SpeexPreprocessState *preprocess;


preprocess = speex_preprocess_state_init(frame_size, sampling_rate); /*
frame_size = 160 */

speex_preprocess_ctl(preprocess, SPEEX_PREPROCESS_SET_DENOISE,

speex_preprocess_ctl(preprocess, SPEEX_PREPROCESS_SET_VAD, &param_enabled); 

speex_preprocess_ctl(preprocess, SPEEX_PREPROCESS_SET_AGC, &param_disabled);


/* inputAdd is address of captured input voice (short *).

is_speech_in_preprocessor = speex_preprocess(preprocess, inputAdd, null);

if (is_speech_in_preprocessor != 0)


      speex_encode_int(enc_state, inputAdd, bitsAdd);



VAD in preprocessor is very good, there is not noise outside speech. I don't
feel problem so much while continuous speech, but when we speak for short
intervals, the start of and end of sentences have clatter (maybe clatter
does not meet that sound, there is a defect). To overcome this problem, are
parameters or if (st->nb_preprocess%200==0) in preprocessor.c (line 608)


Thanks a lot in advance,




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20061229/b20adaa9/attachment.htm

More information about the Speex-dev mailing list