diff --git a/include/asterisk/speech.h b/include/asterisk/speech.h index 260e5ed5d818141813b15a16be96a6b6a537be1b..e152201a3e3eabc81b70841141f941192ee28096 100644 --- a/include/asterisk/speech.h +++ b/include/asterisk/speech.h @@ -73,7 +73,7 @@ struct ast_speech_engine { /*! Name of speech engine */ char *name; /*! Set up the speech structure within the engine */ - int (*create)(struct ast_speech *speech); + int (*create)(struct ast_speech *speech, int format); /*! Destroy any data set on the speech structure by the engine */ int (*destroy)(struct ast_speech *speech); /*! Load a local grammar on the speech structure */ diff --git a/res/res_speech.c b/res/res_speech.c index 67dce81cfd07ef38e5c3da02d0dc17e88b4c5966..fdcf322a6b583fdff847c5c8db09528e03d070d0 100644 --- a/res/res_speech.c +++ b/res/res_speech.c @@ -185,7 +185,7 @@ struct ast_speech *ast_speech_new(char *engine_name, int format) ast_speech_change_state(new_speech, AST_SPEECH_STATE_NOT_READY); /* Pass ourselves to the engine so they can set us up some more and if they error out then do not create a structure */ - if (engine->create(new_speech)) { + if (engine->create(new_speech, format)) { ast_mutex_destroy(&new_speech->lock); ast_free(new_speech); new_speech = NULL;