This function passes a string through an active voice grammar and provides a semantic interpretation. Instead of performing speech recognition on actual audio, this function is used only to evaluate the semantic interpretation of text strings against grammars.
int LV_SRE_InterpretText(HPORT hport, const char* text, unsigned int flags);
Zero (0) or greater indicates success.
A negative result indicates a specific error:
-1: LV_FAILURE: The decode failed.
-12: LV_INVALID_HPORT: The Hport was invalid.
hport
A handle to the speech port.
text
A space separated string of words. This is the string for which you want a semantic interpretation.
Flags (bitwise OR flags to set desired options)
LV_DECODE_SEMANTIC_INTERPRETATION - This flag tells the decoder to process semantic interpretation tags if they exist in the result.
The interpretation is stored in a voice channel called LV_INTERPRET_CHANNEL. Similar to the LV_SRE_Decode function, you may get the interpretation by using LV_SRE_GetInterpretationData and LV_SRE_GetInterpretationString. You can also call LV_SRE_GetNumberOfConceptsReturned, LV_SRE_GetNumberOfInterpretations, and LV_SRE_GetNumberOfParses.
On an error, call LV_SRE_ReturnErrorString with the negative result from LV_SRE_Decode to get a description of the error.
Complete Help Topic List | Speech Engine Product Information