public class SpeechRecognitionResult extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
SpeechRecognitionResult.SpeechResult
Container class for recognized speech.
|
Constructor and Description |
---|
SpeechRecognitionResult(AgiReply agiReply) |
Modifier and Type | Method and Description |
---|---|
List<SpeechRecognitionResult.SpeechResult> |
getAllResults() |
char |
getDigit()
Returns the DTMF digit that was received.
|
int |
getEndpos()
Returns the position where the prompt stopped playing because a DTMF digit was received or speech was
recognized (barge in).
|
String |
getGrammar()
Returns the grammar for the first recognition result.
|
int |
getNumberOfResults()
Returns how many results have been recoginized.
|
int |
getScore()
Returns the confidence score for the first recognition result.
|
String |
getText()
Returns the text for the first recognition result.
|
boolean |
isDtmf()
Checks whether a DTMF digit was recieved.
|
boolean |
isSpeech()
Checks whether speech was recognized.
|
boolean |
isTimeout()
Checks whether a timeout was encountered and neither a DTMF digit was received nor speech was recognized.
|
String |
toString() |
public SpeechRecognitionResult(AgiReply agiReply)
public boolean isDtmf()
true
if a DTMF digit was received, false
otherwise.getDigit()
public boolean isSpeech()
true
if speech was recognized, false
otherwise.getText()
,
getScore()
,
getGrammar()
public boolean isTimeout()
true
a timeout was encountered, false
otherwise.public char getDigit()
public int getEndpos()
public int getScore()
public String getText()
null
if no speech was recognized.public String getGrammar()
null
if no speech was recognized.public int getNumberOfResults()
public List<SpeechRecognitionResult.SpeechResult> getAllResults()
Copyright © 2004–2017. All rights reserved.