Getting the Decode Results

After Decoding, you need to retrieve the results of your decode.  What you retrieve depends on your application:

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:

C++ API

int LVSpeechPort::GetNumberOfParses(int VoiceChannel)

LVParseTree LVSpeechPort::GetParseTreeI(int VoiceChannel, int index)

int LVSpeechPort::GetNumberOfInterpretations(int VoiceChannel)

LVSemanticData LVSpeechPort::GetInterpretationData(int VoiceChannel, int index)

 

C API

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)

 

Return

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.

 

See Also


Complete Help Topic List | Speech Engine Product Information