return SWITCH_FALSE;
}
-
/*! function to feed audio to the ASR */
static switch_status_t pocketsphinx_asr_feed(switch_asr_handle_t *ah, void *data, unsigned int len, switch_asr_flag_t *flags)
{
- // we really should put ps_start_utt(ps->ps, NULL); here when we start to feed it.
pocketsphinx_t *ps = (pocketsphinx_t *) ah->private_info;
int rv = 0;
}
switch_mutex_unlock(ps->flag_mutex);
-
return status;
}
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_mutex_unlock(ps->flag_mutex);
- //*xmlstr = strdup((char *)ps->hyp );
*xmlstr = switch_mprintf("<interpretation grammar=\"%s\" score=\"%d\">\n"
" <result name=\"%s\">%s</result>\n"
status = SWITCH_STATUS_SUCCESS;
}
-
return status;
}
{
return SWITCH_STATUS_UNLOAD;
}
+
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:t
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */