Browse
 
Tools
Rss Categories

LV_SRE_DTMFDecode

Reference Number: AA-00677 Views: 1646 0 Rating/ Voters

This function passes a string of digits delimited by whitespace through an active voice grammar and provides a semantic interpretation. Instead of performing speech recognition on audio, this function is used only to evaluate the semantic interpretation of a string of digits against DTMF grammars.

Note: that this function does not actually process DTMF -- that is the responsibility of a telephony platform. Its input must be a string of digits, not raw DTMF tones.

Function

  • int LV_SRE_DTMFDecode(HPORT hport, const char* dtmf_str, unsigned int flags)

Parameters

hport

The port's handle.

dtmf_str

A space separated string that may contain the numbers from 0-9, the * sign, or the # sign. 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_INVALID_BUFFER

Indicates that dtmf_str is NULL or of 0 length.

LV_INVALID_HPORT

The input hport is not a valid one.

LV_FAILURE

This grammar could not be activated, because the port was shutting down.

LV_LICENSES_EXPIRED

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

LV_GRAMMAR_LOADING_ERROR

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

LV_NO_SERVER_AVAILABLE

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

LV_TIME_OUT

Indicates that the preceeding decode operation timed out.

LV_EXCEPTION

An exception occurred while processing the request.

Remarks

The interpretation is stored in a voice channel called LV_DTMF_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.

On an error, call LV_SRE_ReturnErrorString with the negative result from LV_SRE_DTMFDecode to get a description of the error.

See Also