FreeSWITCH API Documentation
1.7.0
|
switch_status_t switch_core_asr_check_results | ( | switch_asr_handle_t * | ah, |
switch_asr_flag_t * | flags | ||
) |
Check an asr handle for results.
ah | the handle to check |
flags | flags to influence behaviour |
Definition at line 288 of file switch_core_asr.c.
References switch_assert.
Referenced by speech_callback(), and speech_thread().
switch_status_t switch_core_asr_close | ( | switch_asr_handle_t * | ah, |
switch_asr_flag_t * | flags | ||
) |
Close an asr handle.
ah | the handle to close |
flags | flags to influence behaviour |
Definition at line 219 of file switch_core_asr.c.
References SWITCH_ASR_FLAG_CLOSED, SWITCH_ASR_FLAG_FREE_POOL, switch_assert, switch_core_destroy_memory_pool, switch_resample_destroy(), switch_set_flag, switch_test_flag, and UNPROTECT_INTERFACE.
Referenced by speech_callback(), and switch_ivr_detect_speech_init().
switch_status_t switch_core_asr_disable_all_grammars | ( | switch_asr_handle_t * | ah | ) |
Disable all grammars from an asr handle.
ah | the handle to disable the grammars from |
Definition at line 192 of file switch_core_asr.c.
References switch_assert, and SWITCH_STATUS_FALSE.
Referenced by switch_ivr_detect_speech_disable_all_grammars().
switch_status_t switch_core_asr_disable_grammar | ( | switch_asr_handle_t * | ah, |
const char * | name | ||
) |
Disable a grammar from an asr handle.
ah | the handle to disable the grammar from |
name | the name of the grammar to disable |
Definition at line 179 of file switch_core_asr.c.
References switch_assert, and SWITCH_STATUS_FALSE.
Referenced by switch_ivr_detect_speech_disable_grammar().
switch_status_t switch_core_asr_enable_grammar | ( | switch_asr_handle_t * | ah, |
const char * | name | ||
) |
Enable a grammar from an asr handle.
ah | the handle to enable the grammar from |
name | the name of the grammar to enable |
Definition at line 166 of file switch_core_asr.c.
References switch_assert, and SWITCH_STATUS_FALSE.
Referenced by switch_ivr_detect_speech_enable_grammar().
switch_status_t switch_core_asr_feed | ( | switch_asr_handle_t * | ah, |
void * | data, | ||
unsigned int | len, | ||
switch_asr_flag_t * | flags | ||
) |
Feed audio data to an asr handle.
ah | the handle to feed data to |
data | a pointer to the data |
len | the size in bytes of the data |
flags | flags to influence behaviour |
Definition at line 239 of file switch_core_asr.c.
References switch_assert, SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, switch_log_printf(), switch_resample_create, switch_resample_process(), SWITCH_RESAMPLE_QUALITY, SWITCH_STATUS_GENERR, and SWITCH_STATUS_SUCCESS.
Referenced by speech_callback().
switch_status_t switch_core_asr_feed_dtmf | ( | switch_asr_handle_t * | ah, |
const switch_dtmf_t * | dtmf, | ||
switch_asr_flag_t * | flags | ||
) |
Feed DTMF to an asr handle.
ah | the handle to feed data to |
dtmf | a string of DTMF digits |
flags | flags to influence behaviour |
Definition at line 275 of file switch_core_asr.c.
References switch_assert, and SWITCH_STATUS_SUCCESS.
Referenced by speech_on_dtmf().
void switch_core_asr_float_param | ( | switch_asr_handle_t * | ah, |
char * | param, | ||
double | val | ||
) |
Set a float parameter on an asr handle.
sh | the asr handle |
param | the parameter |
val | the value |
Definition at line 345 of file switch_core_asr.c.
References switch_assert.
switch_status_t switch_core_asr_get_result_headers | ( | switch_asr_handle_t * | ah, |
switch_event_t ** | headers, | ||
switch_asr_flag_t * | flags | ||
) |
Get result headers from an asr handle.
ah | the handle to get results from |
headers | a pointer to dynamically allocate an switch_event_t result to |
flags | flags to influence behaviour |
Definition at line 302 of file switch_core_asr.c.
References switch_assert, and SWITCH_STATUS_SUCCESS.
Referenced by speech_thread().
switch_status_t switch_core_asr_get_results | ( | switch_asr_handle_t * | ah, |
char ** | xmlstr, | ||
switch_asr_flag_t * | flags | ||
) |
Get results from an asr handle.
ah | the handle to get results from |
xmlstr | a pointer to dynamically allocate an xml result string to |
flags | flags to influence behaviour |
Definition at line 295 of file switch_core_asr.c.
References switch_assert.
Referenced by speech_thread().
switch_status_t switch_core_asr_load_grammar | ( | switch_asr_handle_t * | ah, |
const char * | grammar, | ||
const char * | name | ||
) |
Load a grammar to an asr handle.
ah | the handle to load to |
grammar | the grammar text, file path, or URI |
name | the grammar name |
Definition at line 93 of file switch_core_asr.c.
References switch_assert, switch_core_asr_text_param(), switch_find_end_paren(), switch_safe_free, switch_separate_string(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
Referenced by switch_ivr_detect_speech(), and switch_ivr_detect_speech_load_grammar().
void switch_core_asr_numeric_param | ( | switch_asr_handle_t * | ah, |
char * | param, | ||
int | val | ||
) |
Set a numeric parameter on an asr handle.
sh | the asr handle |
param | the parameter |
val | the value |
Definition at line 336 of file switch_core_asr.c.
References switch_assert.
switch_status_t switch_core_asr_open | ( | switch_asr_handle_t * | ah, |
const char * | module_name, | ||
const char * | codec, | ||
int | rate, | ||
const char * | dest, | ||
switch_asr_flag_t * | flags, | ||
switch_memory_pool_t * | pool | ||
) |
Open an asr handle.
ah | the asr handle to open |
module_name | the name of the asr module |
codec | the preferred codec |
rate | the preferred rate |
dest | the destination address |
flags | flags to influence behaviour |
pool | the pool to use (NULL for new pool) |
Definition at line 40 of file switch_core_asr.c.
References buf, switch_cache_db_handle::flags, pool, SWITCH_ASR_FLAG_FREE_POOL, switch_assert, SWITCH_CHANNEL_LOG, switch_core_new_memory_pool, switch_core_strdup, switch_loadable_module_get_asr_interface(), SWITCH_LOG_ERROR, switch_log_printf(), switch_set_flag, switch_set_string, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, and UNPROTECT_INTERFACE.
Referenced by switch_ivr_detect_speech_init().
switch_status_t switch_core_asr_pause | ( | switch_asr_handle_t * | ah | ) |
Pause detection on an asr handle.
ah | the handle to pause |
Definition at line 205 of file switch_core_asr.c.
References switch_assert.
Referenced by switch_ivr_pause_detect_speech().
switch_status_t switch_core_asr_resume | ( | switch_asr_handle_t * | ah | ) |
Resume detection on an asr handle.
ah | the handle to resume |
Definition at line 212 of file switch_core_asr.c.
References switch_assert.
Referenced by switch_ivr_resume_detect_speech().
switch_status_t switch_core_asr_start_input_timers | ( | switch_asr_handle_t * | ah | ) |
Start input timers on an asr handle.
ah | the handle to start timers on |
Definition at line 314 of file switch_core_asr.c.
References switch_assert, and SWITCH_STATUS_SUCCESS.
Referenced by switch_ivr_detect_speech_start_input_timers().
void switch_core_asr_text_param | ( | switch_asr_handle_t * | ah, |
char * | param, | ||
const char * | val | ||
) |
Set a text parameter on an asr handle.
sh | the asr handle |
param | the parameter |
val | the value |
Definition at line 327 of file switch_core_asr.c.
References switch_assert.
Referenced by switch_core_asr_load_grammar(), and switch_ivr_set_param_detect_speech().
switch_status_t switch_core_asr_unload_grammar | ( | switch_asr_handle_t * | ah, |
const char * | name | ||
) |
Unload a grammar from an asr handle.
ah | the handle to unload the grammar from |
name | the name of the grammar to unload |
Definition at line 156 of file switch_core_asr.c.
References switch_assert.
Referenced by switch_ivr_detect_speech_unload_grammar().
switch_status_t switch_core_speech_close | ( | switch_speech_handle_t * | sh, |
switch_speech_flag_t * | flags | ||
) |
Close an open speech handle.
sh | the speech handle to close |
flags | flags in/out for fine tuning |
Definition at line 283 of file switch_core_speech.c.
References switch_buffer_destroy(), switch_clear_flag, switch_core_destroy_memory_pool, switch_resample_destroy(), SWITCH_SPEECH_FLAG_FREE_POOL, SWITCH_SPEECH_FLAG_OPEN, SWITCH_STATUS_FALSE, switch_test_flag, and UNPROTECT_INTERFACE.
Referenced by switch_ivr_clear_speech_cache(), and switch_ivr_speak_text().
switch_status_t switch_core_speech_feed_tts | ( | switch_speech_handle_t * | sh, |
char * | text, | ||
switch_speech_flag_t * | flags | ||
) |
Feed text to the TTS module.
sh | the speech handle to feed |
text | the buffer to write |
flags | flags in/out for fine tuning |
Definition at line 99 of file switch_core_speech.c.
References switch_assert, switch_core_speech_text_param_tts(), switch_find_end_paren(), switch_safe_free, switch_separate_string(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and zstr.
Referenced by switch_ivr_speak_text_handle().
void switch_core_speech_float_param_tts | ( | switch_speech_handle_t * | sh, |
char * | param, | ||
double | val | ||
) |
Set a float parameter on a TTS handle.
sh | the speech handle |
param | the parameter |
val | the value |
Definition at line 189 of file switch_core_speech.c.
References switch_assert.
void switch_core_speech_flush_tts | ( | switch_speech_handle_t * | sh | ) |
Flush TTS audio on a given handle.
sh | the speech handle |
Definition at line 162 of file switch_core_speech.c.
References switch_assert.
Referenced by switch_ivr_speak_text_handle().
void switch_core_speech_numeric_param_tts | ( | switch_speech_handle_t * | sh, |
char * | param, | ||
int | val | ||
) |
Set a numeric parameter on a TTS handle.
sh | the speech handle |
param | the parameter |
val | the value |
Definition at line 180 of file switch_core_speech.c.
References switch_assert.
switch_status_t switch_core_speech_open | ( | _In_ switch_speech_handle_t * | sh, |
const char * | module_name, | ||
const char * | voice_name, | ||
_In_ unsigned int | rate, | ||
_In_ unsigned int | interval, | ||
_In_ unsigned int | channels, | ||
switch_speech_flag_t * | flags, | ||
_In_opt_ switch_memory_pool_t * | pool | ||
) |
Open a speech handle.
sh | a speech handle to use |
module_name | the speech module to use |
voice_name | the desired voice name |
rate | the sampling rate |
interval | the sampling interval |
flags | tts flags |
pool | the pool to use (NULL for new pool) |
Referenced by switch_ivr_speak_text().
switch_status_t switch_core_speech_read_tts | ( | switch_speech_handle_t * | sh, |
void * | data, | ||
switch_size_t * | datalen, | ||
switch_speech_flag_t * | flags | ||
) |
Read rendered audio from the TTS module.
sh | the speech handle to read |
data | the buffer to read to |
datalen | the max size / written size of the data |
rate | the rate of the read audio |
flags | flags in/out for fine tuning |
Definition at line 198 of file switch_core_speech.c.
References switch_assert, switch_buffer_create_dynamic(), switch_buffer_inuse(), switch_buffer_read(), switch_buffer_write(), SWITCH_CHANNEL_LOG, switch_clear_flag, switch_core_alloc, SWITCH_LOG_CRIT, switch_log_printf(), switch_mux_channels(), switch_resample_create, switch_resample_process(), SWITCH_RESAMPLE_QUALITY, switch_set_flag, SWITCH_SPEECH_FLAG_DONE, SWITCH_STATUS_BREAK, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, and switch_test_flag.
Referenced by switch_ivr_speak_text_handle().
void switch_core_speech_text_param_tts | ( | switch_speech_handle_t * | sh, |
char * | param, | ||
const char * | val | ||
) |
Set a text parameter on a TTS handle.
sh | the speech handle |
param | the parameter |
val | the value |
Definition at line 171 of file switch_core_speech.c.
References switch_assert.
Referenced by switch_core_speech_feed_tts(), and switch_ivr_speak_text().