res_speech: Add a type conversion, and new engine unregister methods

Add a new function that converts a speech results type to a string.
Also add another function to unregister an engine, but returns a
pointer to the unregistered engine object instead of a success/fail
integer.

Change-Id: I0f7de17cb411021c09fb03988bc2b904e1380192
This commit is contained in:
Kevin Harwell
2021-10-21 12:49:44 -05:00
committed by Kevin Harwell
parent 6b094e905b
commit cf0fa9b82f
2 changed files with 29 additions and 6 deletions

View File

@@ -47,6 +47,9 @@ enum ast_speech_results_type {
AST_SPEECH_RESULTS_TYPE_NBEST,
};
/*! \brief Convert a speech results type to a string */
const char *ast_speech_results_type_to_string(enum ast_speech_results_type type);
/* Speech structure */
struct ast_speech {
/*! Structure lock */
@@ -152,6 +155,9 @@ int ast_speech_change_state(struct ast_speech *speech, int state);
int ast_speech_register(struct ast_speech_engine *engine);
/*! \brief Unregister a speech recognition engine */
int ast_speech_unregister(const char *engine_name);
/*! \brief Unregister a speech recognition engine */
struct ast_speech_engine *ast_speech_unregister2(const char *engine_name);
#if defined(__cplusplus) || defined(c_plusplus)
}