[Speex-dev] Adjustable parameters for VAD in preprocessor

Thorvald Natvig speex at natvig.com
Sun Sep 18 19:23:21 PDT 2005


*Sigh* Some day I'll learn to set the right sender address when posting to 
membership-restricted mailing addresses. Was wondering why this hadn't 
arrived. Reposted message as follows:



Hi,

Would a patch to change the constants on line 454 - 462 in the preprocessor 
into variables be of general interest? At the moment, whether or not 
"is_speech" is 1 is hardcoded to be (speec_prob > .35 or >.1 within last 20 
frames or it's been less than 20 frames without).. I'd like to turn those 4 
constants into speex_preprocess_ctl tunable variables, most likely through 
SPEEX_PREPROCESS_GET_VAD_PARAMETERS / SET_VAD_PARAMETERS with ptr being a 
pointer to

typedef struct {
   float trigger_level;
   float keep_level;
   int keep_window;
   int tail_length;
} SpeexPreprocessVadParameters;

I'm a bit unsure if keep_window (used with prob > .1) should be the same as 
tail_length. At the moment, I have an external counter in my program that keeps 
track of how many frames it's been since the vad returned 1, and if it's less 
than a user-set ammount, treat it as if it's still voice. This works well for 
users that have slightly long pauses between sentences or words.


More information about the Speex-dev mailing list