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);
152 #if defined(__cplusplus) || defined(c_plusplus)
int(* change_results_type)(struct ast_speech *speech, enum ast_speech_results_type results_type)
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.
int(* activate)(struct ast_speech *speech, const char *grammar_name)
enum ast_speech_results_type results_type
int(* change)(struct ast_speech *speech, const char *name, const char *value)
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(* start)(struct ast_speech *speech)
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(* dtmf)(struct ast_speech *speech, const char *dtmf)
int ast_speech_change_state(struct ast_speech *speech, int state)
Change state of a speech structure.
int(* create)(struct ast_speech *speech, int format)
struct ast_speech_engine * engine
int(* unload)(struct ast_speech *speech, const char *grammar_name)
int ast_speech_grammar_unload(struct ast_speech *speech, const char *grammar_name)
Unload a grammar.
struct ast_speech_result * results
int(* write)(struct ast_speech *speech, void *data, int len)
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)
int(* load)(struct ast_speech *speech, const char *grammar_name, const char *grammar)
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.
AST_LIST_ENTRY(ast_speech_engine) list
int ast_speech_unregister(const char *engine_name)
Unregister a speech recognition engine.
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(* deactivate)(struct ast_speech *speech, const char *grammar_name)
static snd_pcm_format_t format
int ast_speech_change(struct ast_speech *speech, const char *name, const char *value)
Change an engine specific attribute.
int(* destroy)(struct ast_speech *speech)
Structure for mutex and tracking information.
struct ast_speech * ast_speech_new(const char *engine_name, int formats)
Create a new speech structure.