SpeechRecognitionEngine.Recognize Method (TimeSpan)
Provides a single synchronous recognition operation, with a predetermined time out, on recognition engine input.
Assembly: Microsoft.Speech (in microsoft.speech.dll)
A valid instance of TimeSpan defining a time out period, after which if no input is received an error is generated.
Returns a valid instance of RecognitionResult is the recognition engine has be able to recognize the input, null is recognition fails.
If input is received by a recognition engine within the time time span indicated by initialSilenceTimeout argument Recognize(TimeSpan), performs a single recognition operation and then terminates.
The synchronous recognition operations of Recognize(TimeSpan) do not generate any of the SpeechRecognitionEngine events, in particular RecognizeCompleted is not generated.
Recognition failure may be due either to timing out against the values of the initialSilenceTimeout argument or the BabbleTimeout property on the current instance of SpeechRecognitionEngine, or because the recognition engine finds no matches against the Grammar that has been loaded into it.
All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.
Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition