saiInitRecognitionList

Initializes the grammar list used by saiAddRecognitionGrammar, saiDefineGrammarRecognizer, and saiStartRecognizer.

Prototype

DWORD saiInitRecognitionList ( void *grmList, DWORD grmListSize )

Argument

Description

grmList

Pointer to a grammar list.

grmListSize

Size of the grammar list.


Return values

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.


Details

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.

Example

See saiStartRecognizer.