SpeechRecognizer.EmulateRecognize Method (String, CompareOptions)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Emulates input of a phrase to the shared speech recognizer, using text instead of audio for synchronous speech recognition, and specifies how the recognizer handles Unicode comparison between the phrase and the loaded speech recognition grammars.

Namespace:   System.Speech.Recognition
Assembly:  System.Speech (in System.Speech.dll)

public RecognitionResult EmulateRecognize(
	string inputText,
	CompareOptions compareOptions


Type: System.String

The input phrase for the recognition operation.

Type: System.Globalization.CompareOptions

A bitwise combination of the enumeration values that describe the type of comparison to use for the emulated recognition operation.

Return Value

Type: System.Speech.Recognition.RecognitionResult

The recognition result for the recognition operation, or null, if the operation is not successful or Windows Speech Recognition is in the Sleeping state.

The recognizer uses the compareOptions when it applies grammar rules to the input phrase. The recognizers that ship with Vista and Windows 7 ignore case if the OrdinalIgnoreCase or IgnoreCase value is present. The recognizers always ignore the character width and never ignore the Kana type. The recognizers also ignore new lines and extra white space and treats punctuation as literal input. For more information about character width and Kana type, see the CompareOptions enumeration.

.NET Framework
Available since 3.0
Return to top