changing to standard XML format
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13908 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4aa9e3f6fa
commit
1deab52304
|
@ -383,20 +383,17 @@ static switch_status_t pocketsphinx_asr_get_results(switch_asr_handle_t *ah, cha
|
||||||
ps->confidence = 0;
|
ps->confidence = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Recognized: %s, Score: %d\n", ps->hyp, ps->confidence);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Recognized: %s, Confidence: %d\n", ps->hyp, ps->confidence);
|
||||||
switch_mutex_unlock(ps->flag_mutex);
|
switch_mutex_unlock(ps->flag_mutex);
|
||||||
|
|
||||||
*xmlstr = switch_mprintf("<interpretation grammar=\"%s\" score=\"%d\">\n"
|
*xmlstr = switch_mprintf("<?xml version=\"1.0\"?>\n"
|
||||||
" <result name=\"%s\">%s</result>\n"
|
"<result grammar=\"%s\">\n"
|
||||||
" <input>%s</input>\n"
|
" <interpretation grammar=\"%s\" confidence=\"%d\">\n"
|
||||||
"</interpretation>",
|
" <input mode=\"speech\">%s</input>\n"
|
||||||
ps->grammar, ps->confidence,
|
" </interpretation>\n"
|
||||||
"match",
|
"</result>\n",
|
||||||
ps->hyp,
|
ps->grammar, ps->grammar, ps->confidence, ps->hyp);
|
||||||
ps->hyp
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
if (switch_test_flag(ps, SWITCH_ASR_FLAG_AUTO_RESUME)) {
|
if (switch_test_flag(ps, SWITCH_ASR_FLAG_AUTO_RESUME)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Auto Resuming\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Auto Resuming\n");
|
||||||
switch_set_flag(ps, PSFLAG_READY);
|
switch_set_flag(ps, PSFLAG_READY);
|
||||||
|
|
Loading…
Reference in New Issue