Browse
 
Tools
Rss Categories

LVSpeechPort::InterpretText

Reference Number: AA-00795 Views: 6847 0 Rating/ Voters

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.

Functions

  • int InterpretText(const char* text, unsigned int flags)

Parameters

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)

Unused in the current implementation.

Return Values

Non-negative number

No errors.

LV_FAILURE

This semantic interpretation could not be obtained since the port was shutting down.

LV_GRAMMAR_LOADING_ERROR

Indicates an error in using an active grammar for the interpret operation (eg: there were no words in the compiled grammar).

LV_INVALID_HPORT

The port is not valid (either CreateClient has not been called or DestroyClient has been called prior to this call).

LV_LICENSES_EXPIRED

Indicates that the license acquired for the interpret operation does not permit the use of the current version of the ASR server.

LV_ACQUIRING_LICENSE_FAILED

The grammar could not be loaded due to a license not being available.

LV_NO_SERVER_AVAILABLE

Indicates that no ASR servers were available to perform the interpretation.

LV_TIME_OUT

Indicates that the preceeding interpret operation timed out.

LV_EXCEPTION

An exception occurred while processing the request.

Remarks

The interpretation is stored in a voice channel called LV_INTERPRET_CHANNEL. Similar to the Decode function, you may get the interpretation by using GetInterpretationData and GetInterpretationString. You can also call GetNumberOfInterpretations and GetNumberOfParses.

See Also