From c88d334363834f1df7097f1d124ae1575c299335 Mon Sep 17 00:00:00 2001 From: Brian West Date: Thu, 10 Jul 2008 20:06:00 +0000 Subject: [PATCH] not less than zero 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mod/asr_tts/mod_pocketsphinx/mod_pocketsphinx.c b/src/mod/asr_tts/mod_pocketsphinx/mod_pocketsphinx.c index 1a2383bcca..1260de536d 100644 --- a/src/mod/asr_tts/mod_pocketsphinx/mod_pocketsphinx.c +++ b/src/mod/asr_tts/mod_pocketsphinx/mod_pocketsphinx.c @@ -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);