From: <sb...@us...> - 2007-11-05 19:48:31
|
Revision: 1269 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1269&view=rev Author: sbalea Date: 2007-11-05 11:46:58 -0800 (Mon, 05 Nov 2007) Log Message: ----------- Update the VAD probability setup code. Speex changed the interface to this functionality, so our code no longer made sense. We also change the probability values: it appears that best result are obtained when using speex default values. I am leaving the code in though, so we know where and what to tweak in case we need to. Modified Paths: -------------- branches/team/mihai/echocan/lib/audio_encode.c Modified: branches/team/mihai/echocan/lib/audio_encode.c =================================================================== --- branches/team/mihai/echocan/lib/audio_encode.c 2007-11-05 19:42:15 UTC (rev 1268) +++ branches/team/mihai/echocan/lib/audio_encode.c 2007-11-05 19:46:58 UTC (rev 1269) @@ -109,7 +109,6 @@ static void set_speex_filters() { int i; - //float f; if ( !st ) return; @@ -123,11 +122,15 @@ i = (iaxci_filters & IAXC_FILTER_DEREVERB) ? 1 : 0; speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB, &i); - /* make vad more sensitive */ - //f = 0.30f; - //speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_PROB_START, &f); - //f = 0.07f; - //speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_PROB_CONTINUE, &f); + /* + * We can tweak these parameters to play with VAD sensitivity. + * For now, we use the default values since it seems they are a good starting point. + * However, if need be, this is the code that needs to change + */ + i = 35; + speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_PROB_START, &i); + i = 20; + speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_PROB_CONTINUE, &i); } static void calculate_level(short *audio, int len, float *level) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |