ref: 317ffc203efc63333fc3b6a42fdb2887321a4325
parent: 9a16e7f9447562313348d3d9606ee2f83c7e52f5
author: Jean-Marc Valin <[email protected]>
date: Mon Oct 8 22:12:02 EDT 2012
Tuning the speech/music probability model
--- a/src/analysis.c
+++ b/src/analysis.c
@@ -409,10 +409,9 @@
#ifndef FIXED_POINT
mlp_process(&net, features, &frame_prob);
- /* Adds a "probability dead zone", with a cap on certainty */
- frame_prob = .90*frame_prob*frame_prob*frame_prob;
-
frame_prob = .5*(frame_prob+1);
+ /* Curve fitting between the MLP probability and the actual probability */
+ frame_prob = .01 + 1.21*frame_prob*frame_prob - .23*pow(frame_prob, 10);
/*printf("%f\n", frame_prob);*/
{
@@ -422,7 +421,7 @@
/* One transition every 3 minutes */
tau = .00005;
beta = .1;
- max_certainty = 1.f/(10+1*tonal->last_transition);
+ max_certainty = .01+1.f/(20+.5*tonal->last_transition);
p0 = (1-tonal->music_prob)*(1-tau) + tonal->music_prob *tau;
p1 = tonal->music_prob *(1-tau) + (1-tonal->music_prob)*tau;
p0 *= pow(1-frame_prob, beta);