5 #include <speex/speex_preprocess.h>
14 SpeexPreprocessState *st;
18 st = speex_preprocess_state_init(NN, 8000);
20 speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DENOISE, &i);
22 speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC, &i);
24 speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC_LEVEL, &i);
26 speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB, &i);
28 speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &f);
30 speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &f);
34 fread(in, sizeof(short), NN, stdin);
37 vad = speex_preprocess_run(st, in);
38 /*fprintf (stderr, "%d\n", vad);*/
39 fwrite(in, sizeof(short), NN, stdout);
42 speex_preprocess_state_destroy(st);