Modules | Files | Inheritance Tree | Inheritance Graph | Name Index
module GNOME::Speech::Recognition
interface RecognizerProperties
Files: GNOME_Speech.idl
GNOME-Speech-Recognition-RecognizerProperties-inheritance GNOME-Speech-EngineProperties.html GNOME-Speech-SpeechObject.html Bonobo-Unknown.html
Operations Summary:
 floatgetCompleteTimeout()
 floatgetConfidenceLevel()
 floatgetIncompleteTimeout()
 longgetNumResultAlternatives()
 floatgetSensitivity()
 floatgetSpeedVsAccuracy()
 booleanisResultAudioProvided()
 booleanisTrainingProvided()
 voidsetCompleteTimeout(in float timeout) raises
 voidsetConfidenceLevel(in float confidenceLevel) raises
 voidsetIncompleteTimeout(in float timeout) raises
 voidsetNumResultAlternatives(in long num) raises
 voidsetResultAudioProvided(in boolean audio) raises
 voidsetSensitivity(in float sensitivity) raises
 voidsetSpeedVsAccuracy(in float speedVsAccuracy) raises
 voidsetTrainingProvided(in boolean trainingProvided) raises

Operations Inherited from EngineProperties
addPropertyChangeListener, getControlComponent, removePropertyChangeListener, reset

Operations Inherited from Bonobo::Unknown
ref, unref, queryInterface

Operation Details:
 float getCompleteTimeout()

Get the "CompleteTimeout" property.

Return:
the "CompleteTimeout" property.
See Also:
setCompleteTimeout


 float getConfidenceLevel()

Get the recognizer's "ConfidenceLevel" property.

Return:
the recognizer's "ConfidenceLevel" property.
See Also:
setConfidenceLevel


 float getIncompleteTimeout()

Get the "IncompleteTimeout" property.

Return:
the "IncompleteTimeout" property.
See Also:
setIncompleteTimeout


 long getNumResultAlternatives()

Get the "NumResultAlternatives" property.

Return:
the "NumResultAlternatives" property.
See Also:
setNumResultAlternatives


 float getSensitivity()

Get the "Sensitivity" property.

Return:
the "Sensitivity" property.
See Also:
setSensitivity


 float getSpeedVsAccuracy()

Get the "SpeedVsAccuracy" property.

Return:
the "SpeedVsAccuracy" property.
See Also:
setSpeedVsAccuracy


 boolean isResultAudioProvided()

Get the "ResultAudioProvided" property.

Return:
the "ResultAudioProvided" property.
See Also:
setResultAudioProvided


 boolean isTrainingProvided()

Get the "TrainingProvided" property.

Return:
the "TrainingProvided" property.
See Also:
setTrainingProvided


 void setCompleteTimeout(in float timeout) raises (PropertyVetoException)

Set the CompleteTimeout property in seconds. This timeout value determines the length of silence required following user speech before the recognizer finalizes a result (with an RESULT_ACCEPTED or RESULT_REJECTED event). The complete timeout is used when the speech is a complete match an active RuleGrammar. By contrast, the incomplete timeout is used when the speech is an incomplete match to an active grammar.

A long complete timeout value delays the result completion and therefore makes the computer's response slow. A short complete timeout may lead to an utterance being broken up inappropriately. Reasonable complete timeout values are typically in the range of 0.3 seconds to 1.0 seconds.

Parameters:
timeout - the CompleteTimeout property in seconds.
See Also:
getCompleteTimeout


 void setConfidenceLevel(in float confidenceLevel) raises (PropertyVetoException)

Set the recognizer's "ConfidenceLevel" property. The confidence level value can very between 0.0 and 1.0. A value of 0.5 is the default for the recognizer. A value of 1.0 requires the recognizer to have maximum confidence in its results or otherwise reject them. A value of 0.0 requires only low confidence so fewer results are rejected.

Parameters:
confidenceLevel - the recognizer's "ConfidenceLevel" property.
See Also:
getConfidenceLevel


 void setIncompleteTimeout(in float timeout) raises (PropertyVetoException)

Set the IncompleteTimeout property in seconds. The timeout value determines the required length of silence following user speech after which a recognizer finalizes a result.

The incomplete timeout applies when the speech prior to the silence is an incomplete match of the active RuleGrammars. In this case, once the timeout is triggered, the partial result is rejected (with a RESULT_REJECTED event).

The incomplete timeout also applies when the speech prior to the silence is a complete match of an active grammar, but where it is possible to speak further and still match the grammar. For example, in a grammar for digit sequences for telephone numbers it might be legal to speak either 7 or 10 digits. If the user pauses briefly after speaking 7 digits then the incomplete timeout applies because the user may then continue with a further 3 digits.

By contrast, the complete timeout is used when the speech is a complete match to an active RuleGrammar and no further words can be spoken.

A long complete timeout value delays the result completion and therefore makes the computer's response slow. A short incomplete timeout may lead to an utterance being broken up inappropriately.

The incomplete timeout is usually longer than the complete timeout to allow users to pause mid-utterance (for example, to breathe).

Parameters:
timeout - the IncompleteTimeout property in seconds.
See Also:
getIncompleteTimeout


 void setNumResultAlternatives(in long num) raises (PropertyVetoException)

Set the "NumResultAlternatives" property. This property indicates the preferred maximum number of N-best alternatives in FinalDictationResult and FinalRuleResult objects. A value of 0 or 1 indicates that the application does not want alternatives; that is, it only wants the best guess.

Recognizers are not required to provide this number of alternatives for every result and the number of alternatives may vary from result to result. Recognizers should only provide alternative tokens which are considered reasonable guesses: that is, the alternatives should be above the ConfidenceLevel set through this interface (unless the Result is rejected).

Providing alternatives requires additional computing power. Applications should only request the number of alternatives that they are likely to use.

Parameters:
num - the "NumResultAlternatives" property.
See Also:
getNumResultAlternatives
FinalDictationResult#getAlternativeTokens
FinalRuleResult#getAlternativeTokens


 void setResultAudioProvided(in boolean audio) raises (IllegalArgumentException)

Set the "ResultAudioProvided" property. If set to true, the recognizer is requested to provide audio with FinalResult objects. If available, the audio is provided through the getAudio methods of the FinalResult interface.

Some recognizers that can provide audio for a FinalResult cannot provide audio for all results. Applications need test audio available individually for results. (For example, a recognizer might only provide audio for dictation results.)

A Recognizer that does not provide audio for any results throws a IllegalArgumentException when an app attempts to set the value to true.

Parameters:
audio - the "ResultAudioProvided" property.
See Also:
isResultAudioProvided
FinalResult#getAudio
FinalResult#getAudioForToken


 void setSensitivity(in float sensitivity) raises (PropertyVetoException)

Set the "Sensitivity" property. The sensitivity level can vary between 0.0 and 1.0. A value of 0.5 is the default for the recognizer. A value of 1.0 gives maximum sensitivity and makes the recognizer sensitive to quiet input but more sensitive to noise. A value of 0.0 gives minimum sensitivity requiring the user to speak loudly and making the recognizer less sensitive to background noise.

Note: some recognizers set the gain automatically during use, or through a setup "Wizard". On these recognizers the sensitivity adjustment should be used only in extreme cases where the automatic settings are not adequate.

Parameters:
sensitivity - the "Sensitivity" property.
See Also:
getSensitivity


 void setSpeedVsAccuracy(in float speedVsAccuracy) raises (PropertyVetoException)

Set the "SpeedVsAccuracy" property. The default value is 0.5 and is the factory-defined compromise of speed and accuracy. A value of 0.0 minimizes response time. A value of 1.0 maximizes recognition accuracy.

Why are speed and accuracy a trade-off? A recognizer determines what a user says by testing different possible sequence of words (with legal sequences being defined by the active grammars). If the recognizer tests more sequences it is more likely to find the correct sequence, but there is additional processing so it is slower. Increasing grammar complexity and decreasing the computer power both make this trade-off more important. Conversely, a simpler grammar or more powerful computer make the trade-off less important.

Parameters:
speedVsAccuracy - the "SpeedVsAccuracy" property.
See Also:
getSpeedVsAccuracy


 void setTrainingProvided(in boolean trainingProvided) raises (PropertyVetoException)

Set the TrainingProvided property. If true, request a recognizer to provide training information for FinalResult objects through the tokenCorrection method.

Not all recognizers support training. Also, recognizers that do support training are not required to support training data for all results. For example, a recognizer might only produce training data with dictation results. A Recognizer that does not support training raises a IllegalArgumentException when an application attempts to set the value to true.

Parameters:
trainingProvided - the TrainingProvided property.
See Also:
isTrainingProvided
FinalResult#tokenCorrection