mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
const qualifiers in asr/tts interfaces.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6121 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
622a2733dc
commit
7b6182aa13
@ -1252,8 +1252,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_speech_close(switch_speech_handle_t
|
|||||||
\return SWITCH_STATUS_SUCCESS if the asr handle was opened
|
\return SWITCH_STATUS_SUCCESS if the asr handle was opened
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah,
|
SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah,
|
||||||
char *module_name,
|
const char *module_name,
|
||||||
char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t *pool);
|
const char *codec,
|
||||||
|
int rate,
|
||||||
|
const char *dest,
|
||||||
|
switch_asr_flag_t *flags,
|
||||||
|
switch_memory_pool_t *pool);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Close an asr handle
|
\brief Close an asr handle
|
||||||
@ -1297,7 +1301,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_get_results(switch_asr_handle_t
|
|||||||
\param path the path to the grammaar file
|
\param path the path to the grammaar file
|
||||||
\return SWITCH_STATUS_SUCCESS
|
\return SWITCH_STATUS_SUCCESS
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_load_grammar(switch_asr_handle_t *ah, char *grammar, char *path);
|
SWITCH_DECLARE(switch_status_t) switch_core_asr_load_grammar(switch_asr_handle_t *ah, const char *grammar, const char *path);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Unload a grammar from an asr handle
|
\brief Unload a grammar from an asr handle
|
||||||
@ -1305,7 +1309,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_load_grammar(switch_asr_handle_t
|
|||||||
\param grammar the grammar to unload
|
\param grammar the grammar to unload
|
||||||
\return SWITCH_STATUS_SUCCESS
|
\return SWITCH_STATUS_SUCCESS
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_unload_grammar(switch_asr_handle_t *ah, char *grammar);
|
SWITCH_DECLARE(switch_status_t) switch_core_asr_unload_grammar(switch_asr_handle_t *ah, const char *grammar);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Pause detection on an asr handle
|
\brief Pause detection on an asr handle
|
||||||
|
@ -153,7 +153,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess
|
|||||||
\return SWITCH_STATUS_SUCCESS if all is well
|
\return SWITCH_STATUS_SUCCESS if all is well
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech(switch_core_session_t *session,
|
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech(switch_core_session_t *session,
|
||||||
char *mod_name, char *grammar, char *path, char *dest, switch_asr_handle_t *ah);
|
const char *mod_name,
|
||||||
|
const char *grammar,
|
||||||
|
const char *path,
|
||||||
|
const char *dest, switch_asr_handle_t *ah);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Stop background Speech detection on a session
|
\brief Stop background Speech detection on a session
|
||||||
@ -191,7 +194,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_load_grammar(switch_cor
|
|||||||
\param grammar the grammar name
|
\param grammar the grammar name
|
||||||
\return SWITCH_STATUS_SUCCESS if all is well
|
\return SWITCH_STATUS_SUCCESS if all is well
|
||||||
*/
|
*/
|
||||||
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_core_session_t *session, char *grammar);
|
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_core_session_t *session, const char *grammar);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Record a session to disk
|
\brief Record a session to disk
|
||||||
|
@ -294,11 +294,11 @@ struct switch_asr_interface {
|
|||||||
/*! the name of the interface */
|
/*! the name of the interface */
|
||||||
const char *interface_name;
|
const char *interface_name;
|
||||||
/*! function to open the asr interface */
|
/*! function to open the asr interface */
|
||||||
switch_status_t (*asr_open) (switch_asr_handle_t *ah, char *codec, int rate, char *dest, switch_asr_flag_t *flags);
|
switch_status_t (*asr_open) (switch_asr_handle_t *ah, const char *codec, int rate, const char *dest, switch_asr_flag_t *flags);
|
||||||
/*! function to load a grammar to the asr interface */
|
/*! function to load a grammar to the asr interface */
|
||||||
switch_status_t (*asr_load_grammar) (switch_asr_handle_t *ah, char *grammar, char *path);
|
switch_status_t (*asr_load_grammar) (switch_asr_handle_t *ah, const char *grammar, const char *path);
|
||||||
/*! function to unload a grammar to the asr interface */
|
/*! function to unload a grammar to the asr interface */
|
||||||
switch_status_t (*asr_unload_grammar) (switch_asr_handle_t *ah, char *grammar);
|
switch_status_t (*asr_unload_grammar) (switch_asr_handle_t *ah, const char *grammar);
|
||||||
/*! function to close the asr interface */
|
/*! function to close the asr interface */
|
||||||
switch_status_t (*asr_close) (switch_asr_handle_t *ah, switch_asr_flag_t *flags);
|
switch_status_t (*asr_close) (switch_asr_handle_t *ah, switch_asr_flag_t *flags);
|
||||||
/*! function to feed audio to the ASR */
|
/*! function to feed audio to the ASR */
|
||||||
|
@ -35,8 +35,12 @@
|
|||||||
#include "private/switch_core_pvt.h"
|
#include "private/switch_core_pvt.h"
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah,
|
SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah,
|
||||||
char *module_name,
|
const char *module_name,
|
||||||
char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t *pool)
|
const char *codec,
|
||||||
|
int rate,
|
||||||
|
const char *dest,
|
||||||
|
switch_asr_flag_t *flags,
|
||||||
|
switch_memory_pool_t *pool)
|
||||||
{
|
{
|
||||||
switch_status_t status;
|
switch_status_t status;
|
||||||
char buf[256] = "";
|
char buf[256] = "";
|
||||||
@ -77,7 +81,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah,
|
|||||||
return ah->asr_interface->asr_open(ah, codec, rate, dest, flags);
|
return ah->asr_interface->asr_open(ah, codec, rate, dest, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_load_grammar(switch_asr_handle_t *ah, char *grammar, char *path)
|
SWITCH_DECLARE(switch_status_t) switch_core_asr_load_grammar(switch_asr_handle_t *ah, const char *grammar, const char *path)
|
||||||
{
|
{
|
||||||
char *epath = NULL;
|
char *epath = NULL;
|
||||||
switch_status_t status;
|
switch_status_t status;
|
||||||
@ -95,7 +99,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_asr_load_grammar(switch_asr_handle_t
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_asr_unload_grammar(switch_asr_handle_t *ah, char *grammar)
|
SWITCH_DECLARE(switch_status_t) switch_core_asr_unload_grammar(switch_asr_handle_t *ah, const char *grammar)
|
||||||
{
|
{
|
||||||
switch_status_t status;
|
switch_status_t status;
|
||||||
|
|
||||||
|
@ -1042,7 +1042,7 @@ 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, char *grammar)
|
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_core_session_t *session, const char *grammar)
|
||||||
{
|
{
|
||||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||||
switch_asr_flag_t flags = SWITCH_ASR_FLAG_NONE;
|
switch_asr_flag_t flags = SWITCH_ASR_FLAG_NONE;
|
||||||
@ -1064,7 +1064,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_c
|
|||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech(switch_core_session_t *session,
|
SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech(switch_core_session_t *session,
|
||||||
char *mod_name, char *grammar, char *path, char *dest, switch_asr_handle_t *ah)
|
const char *mod_name,
|
||||||
|
const char *grammar,
|
||||||
|
const char *path,
|
||||||
|
const char *dest,
|
||||||
|
switch_asr_handle_t *ah)
|
||||||
{
|
{
|
||||||
switch_channel_t *channel;
|
switch_channel_t *channel;
|
||||||
switch_codec_t *read_codec;
|
switch_codec_t *read_codec;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user