mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 04:31:50 +00:00
ivr stuff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1569 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -895,6 +895,28 @@ SWITCH_DECLARE(switch_status_t) switch_core_speech_interpret_asr(switch_speech_h
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_speech_feed_tts(switch_speech_handle_t *sh, char *text, switch_speech_flag_t *flags);
|
||||
|
||||
/*!
|
||||
\brief Flush TTS audio on a given handle
|
||||
\param sh the speech handle
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_speech_flush_tts(switch_speech_handle_t *sh);
|
||||
|
||||
/*!
|
||||
\brief Set a text parameter on a TTS handle
|
||||
\param sh the speech handle
|
||||
\param param the parameter
|
||||
\param val the value
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_speech_text_param_tts(switch_speech_handle_t *sh, char *param, char *val);
|
||||
|
||||
/*!
|
||||
\brief Set a numeric parameter on a TTS handle
|
||||
\param sh the speech handle
|
||||
\param param the parameter
|
||||
\param val the value
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_speech_numeric_param_tts(switch_speech_handle_t *sh, char *param, int val);
|
||||
|
||||
/*!
|
||||
\brief Read rendered audio from the TTS module
|
||||
\param sh the speech handle to read
|
||||
|
||||
@@ -125,6 +125,15 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
|
||||
unsigned int buflen);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session_t *session,
|
||||
switch_speech_handle_t *sh,
|
||||
switch_codec_t *codec,
|
||||
switch_timer_t *timer,
|
||||
switch_dtmf_callback_function_t dtmf_callback,
|
||||
char *text,
|
||||
void *buf,
|
||||
unsigned int buflen);
|
||||
|
||||
/*!
|
||||
\brief Speak given text with given tts engine
|
||||
\param session the session to speak on
|
||||
@@ -139,14 +148,15 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
|
||||
\return SWITCH_STATUS_SUCCESS if all is well
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *session,
|
||||
char *tts_name,
|
||||
char *voice_name,
|
||||
char *timer_name,
|
||||
uint32_t rate,
|
||||
switch_dtmf_callback_function_t dtmf_callback,
|
||||
char *text,
|
||||
void *buf,
|
||||
unsigned int buflen);
|
||||
char *tts_name,
|
||||
char *voice_name,
|
||||
char *timer_name,
|
||||
uint32_t rate,
|
||||
switch_dtmf_callback_function_t dtmf_callback,
|
||||
char *text,
|
||||
void *buf,
|
||||
unsigned int buflen);
|
||||
|
||||
|
||||
/*!
|
||||
\brief Bridge Audio from one session to another
|
||||
|
||||
@@ -327,6 +327,9 @@ struct switch_speech_interface {
|
||||
switch_size_t *datalen,
|
||||
uint32_t *rate,
|
||||
switch_speech_flag_t *flags);
|
||||
void (*speech_flush_tts)(switch_speech_handle_t *sh);
|
||||
void (*speech_text_param_tts)(switch_speech_handle_t *sh, char *param, char *val);
|
||||
void (*speech_numeric_param_tts)(switch_speech_handle_t *sh, char *param, int val);
|
||||
|
||||
const struct switch_speech_interface *next;
|
||||
};
|
||||
@@ -338,7 +341,10 @@ struct switch_speech_handle {
|
||||
const switch_speech_interface_t *speech_interface;
|
||||
/*! flags to control behaviour */
|
||||
uint32_t flags;
|
||||
|
||||
/*! The Name*/
|
||||
char *name;
|
||||
/*! The Rate*/
|
||||
uint32_t rate;
|
||||
/*! the handle's memory pool */
|
||||
switch_memory_pool_t *memory_pool;
|
||||
/*! private data for the format module to store handle specific info */
|
||||
|
||||
Reference in New Issue
Block a user