|
Asterisk-Java | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.asteriskjava.fastagi.SpeechRecognitionResult
public class SpeechRecognitionResult
Contains the results of a speech recognition command.
AgiChannel.speechRecognize(String, int),
AgiChannel.speechRecognize(String, int, int),
SpeechRecognizeCommand,
Serialized Form| Nested Class Summary | |
|---|---|
static class |
SpeechRecognitionResult.SpeechResult
Container class for recognized speech. |
| Constructor Summary | |
|---|---|
SpeechRecognitionResult(AgiReply agiReply)
|
|
| Method Summary | |
|---|---|
java.util.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). |
java.lang.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. |
java.lang.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. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SpeechRecognitionResult(AgiReply agiReply)
| Method Detail |
|---|
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 java.lang.String getText()
null if no speech was recognized.public java.lang.String getGrammar()
null if no speech was recognized.public int getNumberOfResults()
public java.util.List<SpeechRecognitionResult.SpeechResult> getAllResults()
public java.lang.String toString()
toString in class java.lang.Object
|
Asterisk-Java | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||