After Decoding, you need to retrieve the results of your decode. What you retrieve depends on your application:
If you wish to know exactly how the grammar matched the results, and you wish to post-process that result in a separate area of your application, you can retrieve the raw parse-tree.
If you have built your post-processing directly into your grammar using the semantic interpretation tag set, and have directed the speech port to perform semantic interpretation, you can retrieve the semantic interpretation data.
Before retrieving anything, you need to find out how many results (if any) were returned by the engine. Do this by calling GetNumberOfParses, or GetNumberOfInterpretations:
int LVSpeechPort::GetNumberOfParses(int VoiceChannel)
LVParseTree LVSpeechPort::GetParseTreeI(int VoiceChannel, int index)
int LVSpeechPort::GetNumberOfInterpretations(int VoiceChannel)
LVSemanticData LVSpeechPort::GetInterpretationData(int VoiceChannel, int index)
int LV_SRE_GetNumberOfParses(HPORT port, int VoiceChannel)
H_SPT LV_SRE_GetParseTreeHandle(HPORT port, int VoiceChannel, int index)
int LV_SRE_GetNumberOfInterpretations(HPORT hport, int VoiceChannel)
int LV_SRE_GetInterpretationData(HPORT hport, int VoiceChannel, int index)
For GetNumberOfInterpretations and GetNumberOfParses, the return value is the number of distinct parses for the words returned by the Speech Engine, according to the grammar that was active for the decode, or the number of distinct interpretations.
If the value is zero, then a valid sentence was not returned.
If the value is greater than one, then your grammars were ambiguous (not necessarily a bad thing).
For GetInterpretationData and GetParseTree, a C++ object or a C handle representing the parse tree, or interpretation data object is returned.
Complete Help Topic List | Speech Engine Product Information