Browse
 
Tools
Rss Categories

LV_SRE_CreateInterpretation

Reference Number: AA-00671 Views: 1966 0 Rating/ Voters

Returns a handle to a data structure representing the results of the semantic interpretation process. The handle must be released with LVInterpretation_Release when you are finished with it.    

Function

  • H_SI LV_SRE_CreateInterpretation(HPORT hport, int VoiceChannel, int index)

Parameters

hport

A handle to the speech port.

VoiceChannel

The channel that the decode took place on.

index

An utterance could give rise to multiple interpretations, particularly if the grammars involved are ambiguous.  index ranges from 0 to LV_SRE_GetNumberOfInterpretations() - 1.

Return Value

The return type is a handle to an interpretation object. The object is a representation of the ECMAScript object made by the matching grammar, using the Semantic Interpretation for Speech Recognition process.  It also contains additional information such as the confidence score, matching grammar label, and the input sentence. If an error occurs, NULL is returned.  

Remarks

The H_SI handle can be manipulated using the functions in the LVInterpretation C API interface. Any handle given to you by the speech port through LV_SRE_CreateInterpretation must be released with LVInterpretation_Release.

Example


// Open the port and do a decode
// ...
// When the decode is finished, grab an interpretation object

H_SI SemanticInterpretation = LV_SRE_CreateInterpretation(hport, VoiceChannel,
index);

// Start using the interpretation data.
// ...
// Remember to release the element


LVInterpretation_Release(SemanticInterpretation);
 

See Also