]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
not less than zero
authorBrian West <brian@freeswitch.org>
Thu, 10 Jul 2008 20:06:00 +0000 (20:06 +0000)
committerBrian West <brian@freeswitch.org>
Thu, 10 Jul 2008 20:06:00 +0000 (20:06 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8994 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/asr_tts/mod_pocketsphinx/mod_pocketsphinx.c

index 1a2383bcca377cdbaccf6d8e5d74d0b9d5cf411e..1260de536d47f16e2352c151e720952c921d7869 100644 (file)
@@ -372,6 +372,8 @@ static switch_status_t pocketsphinx_asr_get_results(switch_asr_handle_t *ah, cha
 
                if (ps->confidence > 100) {
                        ps->confidence = 100;
+               } else if (ps->confidence < 0) {
+                       ps->confidence = 0;
                }
 
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Recognized: %s, Score: %d\n", ps->hyp, ps->confidence);