Before you can use a grammar, you must load it into the speech port's collection of grammars, or you must load it into the collection of application-level (global) grammars. When you load a grammar, it is compiled for use in the LumenVox Speech Engine.
BOOL LVCA_LoadSRGSGrammarA(HANDLE hCA, LPCSTR gram_name, LPCSTR gram_location);
BOOL LVCA_LoadSRGSGlobalGrammarA(LPCSTR gram_name, LPCSTR gram_location);
hCA
The handle for the speech port you are loading the grammar into.
gram_name
The identifier for the grammar being loaded. Whenever you activate, deactivate, or unload, this is the identifier you will use. This can be a string, or an integer ID if you use the *Idx version of the function call. The string "123" and the integer 123 are identical labels. Integer names are provided for backward compatibility.
gram_location
A file descriptor or uri that points to a valid SRGS grammar file, such as "c:/grammars/pizza.grxml", "http://www.gramsRus.com/phonenumber.gram", or "builtin:dtmf/boolean?y=1;n=2"
If successful, LVCA_LoadSRGSGrammarA returns true. If false is returned, call LVCA_GetLastCallError to retrieve the error code and message.
Complete Help Topic List | Speech Platform Product Information