hp.telephony.media
Interface ASRResult


public interface ASRResult

This interface allows accessing the speech recognition results.

Since:
OCMP 2.3

Method Summary
 ResultAlternative getAlternative(int i)
          Access the recognition result alternative and addiitonal information such as tags, rule type, etc..
 byte[] getNLSML()
          return the NLSML result as a byte array
 int getNumAlternatives()
          returns the number of alternatives, can be 0 if nothing was found
 ASRParsedRule getParsedRule(int i)
          Deprecated. instead use the method getAlternative(int i)
 ResultToken[] getPhrase(int i)
          Deprecated. instead use the method getAlternative(int i)
 String getResultXML()
          Deprecated. instead use the method getNLSML()
 byte[] getUtterance()
          returns the utterance audio data or null if not available
 Date getUtteranceBegin()
          return start time of the input as a Date
 Date getUtteranceEnd()
          return stop time of the input as a Date
 String getUtteranceLocation()
          returns a file name or an URL name indicating where the utterance is stored.
 

Method Detail

getAlternative

public ResultAlternative getAlternative(int i)
Access the recognition result alternative and addiitonal information such as tags, rule type, etc.. The index grows from the more likely to the less likely. The index 0 is for the more likely alternative.


getPhrase

public ResultToken[] getPhrase(int i)
Deprecated. instead use the method getAlternative(int i)

access the recognition result alternative as a table of ResultToken The index grows from the more likely to the less likely.


getParsedRule

public ASRParsedRule getParsedRule(int i)
Deprecated. instead use the method getAlternative(int i)

If applicable (i.e., a rule grammar was used), returns an ASRParsedRule object that allows accessing additional information such as tags, translations, etc.


getNumAlternatives

public int getNumAlternatives()
returns the number of alternatives, can be 0 if nothing was found


getUtterance

public byte[] getUtterance()
returns the utterance audio data or null if not available


getUtteranceLocation

public String getUtteranceLocation()
returns a file name or an URL name indicating where the utterance is stored. Returns null if not available


getUtteranceBegin

public Date getUtteranceBegin()
return start time of the input as a Date


getUtteranceEnd

public Date getUtteranceEnd()
return stop time of the input as a Date


getResultXML

public String getResultXML()
Deprecated. instead use the method getNLSML()

return the XML result as a string


getNLSML

public byte[] getNLSML()
return the NLSML result as a byte array