public final class SpeechRecognition extends Recognition
SpeechRecognition
represents the speech part of an interaction
phase recognition configuration. It is composed of a list of speech
GrammarItem
and optional properties (complete timeout, incomplete
timeout, max speech timeout, max nbest, confidence level, speed versus
accuracy and sensitivity).Constructor and Description |
---|
SpeechRecognition(GrammarItem... grammarItems) |
SpeechRecognition(List<GrammarItem> grammarItems) |
Modifier and Type | Method and Description |
---|---|
protected void |
addJsonProperties(javax.json.JsonObjectBuilder builder) |
SpeechRecognition |
copy() |
boolean |
equals(Object obj) |
Duration |
getCompleteTimeout() |
Double |
getConfidenceLevel() |
Duration |
getIncompleteTimeout() |
Integer |
getMaxNBest() |
Duration |
getMaxSpeechTimeout() |
Double |
getSensitivity() |
Double |
getSpeedVersusAccuracy() |
int |
hashCode() |
void |
setCompleteTimeout(Duration completeTimeout) |
void |
setConfidenceLevel(Double confidenceLevel) |
void |
setIncompleteTimeout(Duration incompleteTimeout) |
void |
setMaxNBest(Integer maxNBest) |
void |
setMaxSpeechTimeout(Duration maxSpeechTimeout) |
void |
setSensitivity(Double sensitivity) |
void |
setSpeedVersusAccuracy(Double speedVersusAccuracy) |
addProperty, asJson, copyPropertiesTo, getGrammarItems, getProperty, getPropertyNames, hasProperty, removeProperty, setGrammarItems, setGrammarItems, toString
public SpeechRecognition(GrammarItem... grammarItems)
grammarItems
- The list of speech GrammarItem
. Not null.public SpeechRecognition(List<GrammarItem> grammarItems)
grammarItems
- The list of speech GrammarItem
. Not null.public void setCompleteTimeout(Duration completeTimeout)
completeTimeout
- The required length of silence following user
speech before the speech recognizer finalizes a complete
result. null
to use the VoiceXML platform defaultpublic void setIncompleteTimeout(Duration incompleteTimeout)
incompleteTimeout
- The required length of silence following user
speech after which a recognizer finalizes an incomplete
result. null
to use the VoiceXML platform defaultpublic void setMaxSpeechTimeout(Duration maxSpeechTimeout)
maxSpeechTimeout
- The maximum duration of user speech.
null
to use the VoiceXML platform defaultpublic void setMaxNBest(Integer maxNBest)
maxNBest
- The maximum size of the recognition result. Must be a
positive integer. null
to use the VoiceXML
platform defaultpublic void setConfidenceLevel(Double confidenceLevel)
confidenceLevel
- The speech recognition confidence level. Results
with confidence below this value will be rejected (nomatch).
Value must be between 0.0 and 1.0.null
to use the
VoiceXML platform default.public void setSpeedVersusAccuracy(Double speedVersusAccuracy)
speedVersusAccuracy
- A hint specifying the desired balance between
speed versus accuracy. A value of 0.0 means fastest
recognition. A value of 1.0 means best accuracy.
null
to use the VoiceXML platform defaultpublic void setSensitivity(Double sensitivity)
sensitivity
- Set the sensitivity level. A value of 1.0 means that
it is highly sensitive to quiet input. A value of 0.0 means it
is least sensitive to noise. null
to use the
VoiceXML platform default.public Duration getCompleteTimeout()
public Duration getIncompleteTimeout()
public Duration getMaxSpeechTimeout()
public Integer getMaxNBest()
public Double getConfidenceLevel()
public Double getSpeedVersusAccuracy()
public Double getSensitivity()
protected void addJsonProperties(javax.json.JsonObjectBuilder builder)
addJsonProperties
in class Recognition
public int hashCode()
hashCode
in class Recognition
public boolean equals(Object obj)
equals
in class Recognition
public SpeechRecognition copy()
Copyright © 2019 Nu Echo Inc..