hp.telephony.media
Interface ResultToken


public interface ResultToken

This Interface allows accessing a word recognized by an ASR engine.

Since:
OCMP 2.3

Method Summary
 String getFinalizedWord()
          Deprecated. instead use the method getRecognizedWord()
 byte[] getRecognizedWord()
          return a byte array containing the recognized word
 String getTag()
          return a grammar associated tag or null if none
 int getWordBegin()
          return a pointer to the beginning of the word in the utterance, in milliseconds
 String getWordEncoding()
          return a String containing the recognized word's encoding.
 int getWordEnd()
          return a pointer to the end of the word in the utterance, in milliseconds
 

Method Detail

getFinalizedWord

public String getFinalizedWord()
Deprecated. instead use the method getRecognizedWord()

return a String containing the recognized word


getRecognizedWord

public byte[] getRecognizedWord()
return a byte array containing the recognized word

See Also:
getWordEncoding()

getTag

public String getTag()
return a grammar associated tag or null if none


getWordBegin

public int getWordBegin()
return a pointer to the beginning of the word in the utterance, in milliseconds


getWordEnd

public int getWordEnd()
return a pointer to the end of the word in the utterance, in milliseconds


getWordEncoding

public String getWordEncoding()
return a String containing the recognized word's encoding.

While the returned encoding is either "UTF-8" or "UTF-16", the XML parser executes a pre-processing and extracts the Unicode characters of the recognized's word. In those cases, the recognized word's byte array will not anymore be UTF-8 or UTF-16 encoded but directly a Unicode byte array.