mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
MERGE: OpenMethods ASR enhancements: multiple concurrent grammars and dialplan access to start-input-timers
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Luke Dashjr <luke@openmethods.com> (OpenMethods, LLC)
|
||||
*
|
||||
*
|
||||
* switch_core.h -- Core Library
|
||||
@@ -1768,6 +1769,29 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_load_grammar(switch_asr_handle_t
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_unload_grammar(switch_asr_handle_t *ah, const char *name);
|
||||
|
||||
/*!
|
||||
\brief Enable a grammar from an asr handle
|
||||
\param ah the handle to enable the grammar from
|
||||
\param name the name of the grammar to enable
|
||||
\return SWITCH_STATUS_SUCCESS
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_enable_grammar(switch_asr_handle_t *ah, const char *name);
|
||||
|
||||
/*!
|
||||
\brief Disable a grammar from an asr handle
|
||||
\param ah the handle to disable the grammar from
|
||||
\param name the name of the grammar to disable
|
||||
\return SWITCH_STATUS_SUCCESS
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_disable_grammar(switch_asr_handle_t *ah, const char *name);
|
||||
|
||||
/*!
|
||||
\brief Disable all grammars from an asr handle
|
||||
\param ah the handle to disable the grammars from
|
||||
\return SWITCH_STATUS_SUCCESS
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_disable_all_grammars(switch_asr_handle_t *ah);
|
||||
|
||||
/*!
|
||||
\brief Pause detection on an asr handle
|
||||
\param ah the handle to pause
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Neal Horman <neal at wanlink dot com>
|
||||
* Bret McDanel <trixter AT 0xdecafbad dot com>
|
||||
* Luke Dashjr <luke@openmethods.com> (OpenMethods, LLC)
|
||||
*
|
||||
* switch_ivr.h -- IVR Library
|
||||
*
|
||||
@@ -198,8 +199,38 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_load_grammar(switch_cor
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_core_session_t *session, const char *name);
|
||||
|
||||
/*!
|
||||
\brief Enable a grammar on a background speech detection handle
|
||||
\param session The session to change the grammar on
|
||||
\param name the grammar name
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_enable_grammar(switch_core_session_t *session, const char *name);
|
||||
|
||||
/*!
|
||||
\brief Disable a grammar on a background speech detection handle
|
||||
\param session The session to change the grammar on
|
||||
\param name the grammar name
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_disable_grammar(switch_core_session_t *session, const char *name);
|
||||
|
||||
/*!
|
||||
\brief Disable all grammars on a background speech detection handle
|
||||
\param session The session to change the grammar on
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_disable_all_grammars(switch_core_session_t *session);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_set_param_detect_speech(switch_core_session_t *session, const char *name, const char *val);
|
||||
|
||||
/*!
|
||||
\brief Start input timers on a background speech detection handle
|
||||
\param session The session to start the timers on
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_start_input_timers(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Record a session to disk
|
||||
\param session the session to record
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Luke Dashjr <luke@openmethods.com> (OpenMethods, LLC)
|
||||
*
|
||||
*
|
||||
* switch_module_interfaces.h -- Module Interface Definitions
|
||||
@@ -396,6 +397,12 @@ struct switch_asr_interface {
|
||||
switch_mutex_t *reflock;
|
||||
switch_loadable_module_interface_t *parent;
|
||||
struct switch_asr_interface *next;
|
||||
/*! function to enable a grammar to the asr interface */
|
||||
switch_status_t (*asr_enable_grammar) (switch_asr_handle_t *ah, const char *name);
|
||||
/*! function to disable a grammar to the asr interface */
|
||||
switch_status_t (*asr_disable_grammar) (switch_asr_handle_t *ah, const char *name);
|
||||
/*! function to disable all grammars to the asr interface */
|
||||
switch_status_t (*asr_disable_all_grammars) (switch_asr_handle_t *ah);
|
||||
};
|
||||
|
||||
/*! an abstract representation of an asr speech interface. */
|
||||
|
||||
Reference in New Issue
Block a user