[xiph-cvs] cvs commit: speex/libspeex denoise.c
Jean-Marc Valin
jm at xiph.org
Sat May 24 21:13:09 PDT 2003
jm 03/05/25 00:13:09
Modified: libspeex denoise.c
Log:
made the VAD a bit more sensitive
Revision Changes Path
1.17 +7 -5 speex/libspeex/denoise.c
Index: denoise.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/denoise.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- denoise.c 25 May 2003 03:01:47 -0000 1.16
+++ denoise.c 25 May 2003 04:13:09 -0000 1.17
@@ -506,14 +506,16 @@
p1 *= (1-pr);
}
- p0 = pow(p0,.3);
- p1 = pow(p1,.3);
+ p0 = pow(p0,.2);
+ p1 = pow(p1,.2);
#if 1
+ p0 *= 2;
p0=p0/(p1+p0);
+ if (st->last_speech>20)
{
float tmp = sqrt(tot_loudness)/st->loudness2;
- tmp = 1-exp(-8*tmp);
+ tmp = 1-exp(-10*tmp);
if (p0>tmp)
p0=tmp;
}
@@ -536,13 +538,13 @@
st->speech_prob = p0/(1e-25+p1+p0);
/*fprintf (stderr, "%f %f %f ", tot_loudness, st->loudness2, st->speech_prob);*/
- if (st->speech_prob>.5 || (st->last_speech < 15 && st->speech_prob>.25))
+ if (st->speech_prob>.35 || (st->last_speech < 20 && st->speech_prob>.1))
{
is_speech = 1;
st->last_speech = 0;
} else {
st->last_speech++;
- if (st->last_speech<15)
+ if (st->last_speech<20)
is_speech = 1;
}
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list