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.
int DTMFDecode(const char* dtmf_str, unsigned int flags);
Zero (0) or greater indicates success.
A negative result indicates a specific error:
-1: LV_FAILURE: The decode failed.
-12: LV_INVALID_HPORT: The Hport was invalid.
hport
A handle to the speech port.
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)
LV_DECODE_SEMANTIC_INTERPRETATION - This flag tells the decoder to process the parse tree return type for semantic information in the tree's tags.
The interpretation is stored in a voice channel called LV_DTMF_CHANNEL. Similar to the LVSpeechPort::Decode function, you may get the interpretation by using LVSpeechPort::GetInterpretation and LVSpeechPort::GetInterpretationString. You can also call LVSpeechPort::GetNumberOfInterpretations and LVSpeechPort::GetNumberOfParses.
On an error, call LV_SRE_ReturnErrorString with the negative result from LV_SRE_Decode to get a description of the error.
Complete Help Topic List | Speech Engine Product Information