Initializes the grammar list used by saiAddRecognitionGrammar, saiDefineGrammarRecognizer, and saiStartRecognizer.
DWORD saiInitRecognitionList ( void *grmList, DWORD grmListSize )
|
Argument |
Description |
|
grmList |
Pointer to a grammar list. |
|
grmListSize |
Size of the grammar list. |
|
Return value |
Description |
|
SUCCESS |
|
|
SAIERR_INVALID_PARAMETER |
One of the specified arguments is invalid. |
|
SAIERR_NOT_ENOUGH_MEMORY |
Grammar list is not large enough for the recognizer to use. The grammar list must contain at least enough memory for the main list header and at least one header per grammar entry. |
The grmListSize value must include the internal list header information and the data size of each item to be added. Use the helper macro SAI_COMPUTE_LIST_OVERHEAD (nElement, overheadSize) to calculate the total overhead size according to the number of items in the list. The grammar list requires at least one main header and one header per grammar entry.
See saiStartRecognizer.