public class SpeechRecognizerProperties
extends java.lang.Object
This class must be extended to specify platform specific values.
| Modifier and Type | Field and Description |
|---|---|
static float |
DEFAULT_CONFIDENCE_LEVEL
The default confidence level.
|
static float |
DEFAULT_SENSITIVITY
The default sensitivity.
|
static float |
DEFAULT_SPEED_VS_ACCURACY
The default balance between speed vs. accuracy.
|
static java.lang.String |
PROPERTY_COMPLETE_TIMEOUT
Name of the
completetimeout property. |
static java.lang.String |
PROPERTY_CONFIDENCE_LEVEL
Name of the
confidencelevel property. |
static java.lang.String |
PROPERTY_INCOMPLETE_TIMEOUT
Name of the
incompletetimeout property. |
static java.lang.String |
PROPERTY_MAX_SPEECH_TIMEOUT
Name of the
maxspeechtimeout property. |
static java.lang.String |
PROPERTY_SENSITIVITY
Name of the
sensitivity property. |
static java.lang.String |
PROPERTY_SPEED_VS_ACCURACY
Name of the
speedvsaccuracy property. |
| Constructor and Description |
|---|
SpeechRecognizerProperties()
Constructs a new object.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCompletetimeoutAsMsec()
Retrieves the length of silence required following user speech before the
speech recognizer finalizes a result.
|
float |
getConfidencelevel()
Retrieves the confidence level.
|
long |
getIncompletetimeoutAsMsec()
Retrieves the required length of silence following user speech after
which a recognizer finalizes a result.
|
long |
getMaxspeechtimeoutAsMsec()
/* Retrieves the maximum duration of user speech.
|
float |
getSensitivity()
Retrieves the sensitivity.
|
float |
getSpeedvsaccuracy()
Retrieves a hint specifying the desired balance between speed vs.
|
void |
setCompletetimeout(java.lang.String value)
Sets the length of silence required following user speech before the
speech recognizer finalizes a result.
|
void |
setConfidencelevel(float value)
Sets the confidence level.
|
protected void |
setEnhancedProperties(java.util.Map<java.lang.String,java.lang.String> props)
May be used to set custom properties if this class is extended.
|
void |
setIncompletetimeout(java.lang.String value)
Sets the required length of silence following user speech after
which a recognizer finalizes a result.
|
void |
setMaxspeechtimeout(java.lang.String value)
/* Sets the maximum duration of user speech.
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> props)
Retrieves the speech recognizer properties from the given map.
|
void |
setSensitivity(float value)
Sets the sensitivity.
|
void |
setSpeedvsaccuracy(float value)
Sets the hint specifying the desired balance between speed vs.
|
public static final java.lang.String PROPERTY_CONFIDENCE_LEVEL
confidencelevel property.public static final java.lang.String PROPERTY_SENSITIVITY
sensitivity property.public static final java.lang.String PROPERTY_SPEED_VS_ACCURACY
speedvsaccuracy property.public static final java.lang.String PROPERTY_COMPLETE_TIMEOUT
completetimeout property.public static final java.lang.String PROPERTY_INCOMPLETE_TIMEOUT
incompletetimeout property.public static final java.lang.String PROPERTY_MAX_SPEECH_TIMEOUT
maxspeechtimeout property.public static final float DEFAULT_CONFIDENCE_LEVEL
public static final float DEFAULT_SENSITIVITY
public static final float DEFAULT_SPEED_VS_ACCURACY
public SpeechRecognizerProperties()
public final void setProperties(java.util.Map<java.lang.String,java.lang.String> props)
props - map with current propertiesprotected void setEnhancedProperties(java.util.Map<java.lang.String,java.lang.String> props)
props - map with current properties.public final float getConfidencelevel()
public final void setConfidencelevel(float value)
value - the confidence level to setpublic final float getSensitivity()
public final void setSensitivity(float value)
value - the sensitivity to setpublic final float getSpeedvsaccuracy()
public final void setSpeedvsaccuracy(float value)
value - the speedvsaccuracy to setpublic final long getCompletetimeoutAsMsec()
public final void setCompletetimeout(java.lang.String value)
value - the complete timeout to set as a time designitationpublic final long getIncompletetimeoutAsMsec()
public final void setIncompletetimeout(java.lang.String value)
value - the incomplete timeout to set as a time designationpublic final long getMaxspeechtimeoutAsMsec()
public final void setMaxspeechtimeout(java.lang.String value)
value - the max speech timeout to set as a time designation