UpdateRecognizerSetting Method

Microsoft Speech Platform SDK 11

Collapse imageExpand ImageCopy imageCopyHover image

Updates the values of the current settings for a speech recognition engine managed by a SpeechRecognitionEngine object.

Overload List

  NameDescription
Public methodUpdateRecognizerSetting(String, Int32)Updates the specified setting for the SpeechRecognitionEngine with the specified integer value.
Public methodUpdateRecognizerSetting(String, String)Updates the specified setting for the SpeechRecognitionEngine with the specified integer value.
Top

Remarks

Recognizer settings can contain string, 64-bit integer, or memory address data. The following table describes the settings that are defined for a recognizer that complies with the Microsoft Speech Platform SDK 11. The following settings must have the same range for each recognizer that supports the setting. A recognizer that complies with the Speech Platform SDK 11 is not required to support these settings and can support other settings.

Name

Description

ResourceUsage

Specifies the recognizer's CPU consumption. The range is from 0 to 100. The default value is 50.

HighConfidenceThreshold

Not used by Microsoft.Speech. The value specified here is effectively the same as any value above the LowConfidenceThreshold. The range is from 0 to 100, inclusive. The default value is 80.

NormalConfidenceThreshold

Not used by Microsoft.Speech. The value specified here is effectively the same as any value above the LowConfidenceThreshold. The range is from 0 to 100, inclusive. The default value is 50.

LowConfidenceThreshold

Not used by Microsoft.Speech. Separates the speech recognized confidence range from the speech rejected confidence range. The range is from 0 to 100, inclusive. The default value is 20.

CFGConfidenceRejectionThreshold

The speech recognition engine accepts full utterances with confidence scores above or equal to this threshold, and rejects full utterances with phrase confidence scores below this threshold. This property accepts the following values:

  • The value -1 causes the engine to use its default value.

  • A value in the range of 0-100 sets the phrase confidence rejection threshold to the specified value.

If this value is set to 0, the speech recognition accepts all utterances. If this value is set to 100, the speech recognition engine rejects all utterances. This property is not to be confused with HighConfidenceThreshold, NormalConfidenceThreshold, or LowConfidenceThreshold, which are used to determine how any given confidence value is categorized (low, medium, or high).

ResponseSpeed

Indicates the length of silence at the end of unambiguous input before the speech recognizer completes a recognition operation. The range is from 0 to 10,000 milliseconds (ms). This setting corresponds to the recognizer's EndSilenceTimeout property.

ComplexResponseSpeed

Indicates the length of silence at the end of ambiguous input before the speech recognizer completes a recognition operation. The range is from 0 to 10,000 ms. This setting corresponds to the recognizer's EndSilenceTimeoutAmbiguous property.

EngineThreadPriority

Sets the priority of the engine thread(s). The range of permitted values is defined by the OS.

  • The minimum value is min(THREAD_PRIORITY_IDLE,THREAD_PRIORITY_HIGHEST)

  • The maximum value is max(THREAD_PRIORITY_IDLE,THREAD_PRIORITY_HIGHEST)

The values of these constants are in defined winbase.h.

AdaptationOn

Indicates whether adaptation of the acoustic model is on (value = 1) or off (value = 0). The default value is 1 (on).

PersistedBackgroundAdaptation

Indicates whether background adaptation is on (value = 1) or off (value = 0), and persists the setting in the registry. The default value is 1 (on).

AssumeCFGFromTrustedSource

Bypasses file integrity checks when loading a CFG, to reduce load time. This should *only* be used by applications that can guarantee that the CFG they are loading has previously been compiled by the application (or by another application it trusts) and has been stored in a secure location where it could not be edited by a malicious agent. This property accepts the following values:

  • Value set to 0 = AssumeCFGFromTrustedSource is OFF

  • Value set to 1 = AssumeCFGFromTrustedSource is ON

The threshold values are used to divide a confidence scale into four portions: rejected, low, medium, and high. This is to allow assigning of a text value to confidence scores in defined ranges. Microsoft.Speech does not distinguish between high, normal, and low confidence levels, and does not assign text values to ranges of confidence scores. Modifying the values for HighConfidenceThreshold and NormalConfidenceThreshold, and LowConfidenceThreshold will have no effect on recognition.

To dictate the confidence level at which higher values indicate recognized speech, and equal or lower values indicate rejected speech, use CFGConfidenceRejectionThreshold. Recognition results with confidence values greater than or equal to the CFGConfidenceRejectionThreshold trigger a SpeechRecognized event. Recognition results with confidence values less than the CFGConfidenceRejectionThreshold trigger a SpeechRecognitionRejected event.

The confidence scores assigned to words and phrases by the recognition engine become the values of the RecognizedWordUnit..::..Confidence and RecognizedPhrase..::..Confidence properties, and are converted to range from 0 to 1, instead of from 0-100.

To return one of the recognizer's settings, use the QueryRecognizerSetting method.

You can modify how the speech recognition responds to non-speech input using the BabbleTimeout, InitialSilenceTimeout, EndSilenceTimeout, and EndSilenceTimeoutAmbiguous properties.

See Also