SpeechRecognitionEngine.EmulateRecognize Method (String, CompareOptions)
Emulates input of a phrase to the speech recognizer, using text in place of audio for synchronous speech recognition, and specifies how the recognizer handles Unicode comparison between the phrase and the loaded speech recognition grammars.
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 ValueType: System.Speech.Recognition.RecognitionResult
The result for the recognition operation, or null if the operation is not successful or the recognizer is not enabled.
The recognizer uses 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 recognizer always ignores the character width and never ignores the Kana type. The recognizer also ignores 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.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.