typedef void (*GrammarLogCB)(const char* message, int error_level, void* user_data)
The callback function is called by the LVGrammar object when an error or warning is generated during the grammar compilation process. The types of errors which can be passed through the callback via the error_level parameter are:
LV_GRAMMAR_LOADING_ERROR -- the grammar could not be loaded from the location provided.
LV_GRAMMAR_SYNTAX_ERROR -- one or more rules or statements in the grammar was badly formed. The message parameter provides more detailed information.
LV_GRAMMAR_SYNTAX_WARNING -- one or more statements in the grammar were either missing, or not strictly conforming to specifications, but the grammar builder was able to recover. The message parameter provides more detailed information.
user_data is a pointer to a user-defined class or function which can customize behavior when the LVGrammar object sends logging messages through the callback.
LVGrammar_RegisterLoggingCallback
LVGrammar::RegisterLoggingCallback
Complete Help Topic List | Speech Engine Product Information