SpeechRecognitionEngine.Recognize Method (TimeSpan)

Provides a single synchronous recognition operation, with a predetermined time out, on recognition engine input.

Namespace: Microsoft.Speech.Recognition
Assembly: Microsoft.Speech (in microsoft.speech.dll)

Syntax

'Declaration

Parameters

  • initialSilenceTimeout
    A valid instance of TimeSpan defining a time out period, after which if no input is received an error is generated.

Return Value

Returns a valid instance of RecognitionResult is the recognition engine has be able to recognize the input, null is recognition fails.

Remarks

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.

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

See Also

Reference

SpeechRecognitionEngine Class
SpeechRecognitionEngine Members
Microsoft.Speech.Recognition Namespace