]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
scores mean nothing yet
authorBrian West <brian@freeswitch.org>
Tue, 8 Jul 2008 23:34:01 +0000 (23:34 +0000)
committerBrian West <brian@freeswitch.org>
Tue, 8 Jul 2008 23:34:01 +0000 (23:34 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8950 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/asr_tts/mod_pocketsphinx/mod_pocketsphinx.c

index 7b10b82aa45a5bd96f19c0cd681a7501eb7a7ef4..02c33d45f14257b194d1afde8fb9f09214484d04 100644 (file)
@@ -332,15 +332,16 @@ static switch_status_t pocketsphinx_asr_get_results(switch_asr_handle_t *ah, cha
        if (switch_test_flag(ps, PSFLAG_HAS_TEXT)) {
                switch_mutex_lock(ps->flag_mutex); 
                switch_clear_flag(ps, PSFLAG_HAS_TEXT);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Recognized: %s, Score: %d\n", ps->hyp, ps->score);
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Recognized: %s, Score: 300\n", ps->hyp);
                switch_mutex_unlock(ps->flag_mutex); 
+
+               /* ps->score isn't a confidence score. PocketSphinx doesn't support that yet. */
                
-               *xmlstr = switch_mprintf("<interpretation grammar=\"%s\" score=\"%d\">\n"
+               *xmlstr = switch_mprintf("<interpretation grammar=\"%s\" score=\"300\">\n"
                                                                 "  <result name=\"%s\">%s</result>\n"
                                                                 "  <input>%s</input>\n"
                                                                 "</interpretation>",
-                                                                
-                                                                ps->grammar, ps->score,
+                                                                ps->grammar,
                                                                 "match", 
                                                                 ps->hyp, 
                                                                 ps->hyp