Browse
 
Tools
Rss Categories

LV_SRE_InterpretText

Reference Number: AA-00708 Views: 1575 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 LV_SRE_InterpretText(HPORT hport, const char* text, unsigned int flags)

Parameters

hport

The port's handle.

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 input hport is not a valid one.

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 LV_SRE_Decode function, you may get the interpretation by using LV_SRE_GetInterpretationData and LV_SRE_GetInterpretationString. You can also call LV_SRE_GetNumberOfInterpretations, and LV_SRE_GetNumberOfParses.

See Also