These functions remove a loaded grammar from a speech port object. The last function removes all loaded grammars from the speech port.
int LV_SRE_UnloadGrammar(HPORT hport, const char* gram_name);
int LV_SRE_UnloadGrammarIdx(HPORT hport, int gram_name);
int LV_SRE_UnloadGrammars(HPORT hport);
hport
The handle for the speech port you are unloading the grammar out of.
gram_name
The identifier for the grammar being unloaded. This is the same identifier you gave the grammar when you loaded it. It can be a null terminated string, or an integer if you use the *Idx version of the method.
LV_SUCCESS
No errors; this grammar is removed.
LV_FAILURE
The grammar was not present. Nothing was removed.
Grammars that were activated and then unloaded are still active; they must be explicitly deactivated.
LVSpeechPort::UnloadLoadGrammar functions (C++ API)
Complete Help Topic List | Speech Engine Product Information