23 #ifndef _ASTERISK_SPEECH_H 24 #define _ASTERISK_SPEECH_H 26 #if defined(__cplusplus) || defined(c_plusplus) 81 int (*load)(
struct ast_speech *speech,
const char *grammar_name,
const char *grammar);
83 int (*unload)(
struct ast_speech *speech,
const char *grammar_name);
85 int (*activate)(
struct ast_speech *speech,
const char *grammar_name);
87 int (*deactivate)(
struct ast_speech *speech,
const char *grammar_name);
156 #if defined(__cplusplus) || defined(c_plusplus)
int ast_speech_destroy(struct ast_speech *speech)
Destroy a speech structure.
void ast_speech_start(struct ast_speech *speech)
Indicate to the speech engine that audio is now going to start being written.
enum ast_speech_results_type results_type
int ast_speech_register(struct ast_speech_engine *engine)
Register a speech recognition engine.
struct ast_speech_result * ast_speech_results_get(struct ast_speech *speech)
Get speech recognition results.
int ast_speech_change_results_type(struct ast_speech *speech, enum ast_speech_results_type results_type)
Change the type of results we want.
int ast_speech_grammar_deactivate(struct ast_speech *speech, const char *grammar_name)
Deactivate a grammar on a speech structure.
int ast_speech_change_state(struct ast_speech *speech, int state)
Change state of a speech structure.
struct ast_format_cap * formats
struct ast_speech_engine * engine
int ast_speech_grammar_unload(struct ast_speech *speech, const char *grammar_name)
Unload a grammar.
struct ast_speech_result * results
int ast_speech_grammar_activate(struct ast_speech *speech, const char *grammar_name)
Activate a grammar on a speech structure.
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
static void destroy(struct ast_trans_pvt *pvt)
struct ast_format * format
int ast_speech_results_free(struct ast_speech_result *result)
Free a set of results.
int ast_speech_dtmf(struct ast_speech *speech, const char *dtmf)
Signal to the engine that DTMF was received.
int ast_speech_unregister(const char *engine_name)
Unregister a speech recognition engine.
struct ast_speech * ast_speech_new(const char *engine_name, const struct ast_format_cap *formats)
Create a new speech structure.
int(* dtmf)(struct ast_speech *speech, const char *dtmf)
int ast_speech_write(struct ast_speech *speech, void *data, int len)
Write audio to the speech engine.
int ast_speech_grammar_load(struct ast_speech *speech, const char *grammar_name, const char *grammar)
Load a grammar on a speech structure (not globally)
int ast_speech_get_setting(struct ast_speech *speech, const char *name, char *buf, size_t len)
Get an engine specific attribute.
int ast_speech_change(struct ast_speech *speech, const char *name, const char *value)
Change an engine specific attribute.
Structure for mutex and tracking information.