This documentation is archived and is not being maintained.

RecognizeCompletedEventArgs Class

Returns data from the RecognizeCompleted event.

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

public class RecognizeCompletedEventArgs : AsyncCompletedEventArgs
public class RecognizeCompletedEventArgs extends AsyncCompletedEventArgs
public class RecognizeCompletedEventArgs extends AsyncCompletedEventArgs

An instance of RecognizeCompleted is created when the DtmfRecognitionEngine. RecognizeCompleted or SpeechRecognitionEngine. RecognizeCompleted event is raised.

RecognizeCompletedEventArgs derives from System.EventArgs and is generated upon completion of speech and DTMF recognition operations.


The example below show a simple anonymous method used as the handler for RecognizeCompleted. The handler stores the result of the recognition operation, if Result is not null and updates a state variable. If an error condition exists, a message is sent to the end user.

_recognizer.RecognizeCompleted += delegate(object sender, RecognizeCompletedEventArgs completedEventArgs) {
    _recognitionDone = true;
    if (completedEventArgs.Result != null) {
        _completedEventArgs = completedEventArgs;
        _recognitionSuccess = true;
    } else {
        _completedEventArgs = null;
        _recognitionSuccess = false;
        MessageBox.Show(String.Format("Recognition failed\n",
                                      "InitialSilenceTimeout: {0}\n",
                                      "BabbleTimeout: {0}\n",
                                      "InputStreamEnded: {2}\n",

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

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