Export (0) Print
Expand All

SpeechDetectedEventArgs Class

Class passed to handlers of events generated by recognition engines upon detection of human speech in an audio input.

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

public class SpeechDetectedEventArgs : EventArgs
public class SpeechDetectedEventArgs extends EventArgs
public class SpeechDetectedEventArgs extends EventArgs
Not applicable.

SpeechDetectedEventArgs derives from .

SpeechDetected events (System.Speech.Recognition.Recognizer.SpeechDetected or SpeechRecognitionEngine.SpeechDetected) are generated if recognition engine can identified an input sounds as human speech.

In the example below, a handler is created for SpeechDetected events which initializes a display every time speech is detected and displays status information, including audio position.

_recognizer.SpeechDetected +=
    delegate(object sender, SpeechDetectedEventArgs eventArgs) {
        //Clear previous recognition information
        _audioDeviceStatusLabel.Enabled = true;
        _audioDeviceStatusLabel.Visible = true;
        Utils.DisplayAudioInputFormat(_audioStateLabel, _recognizer);
        Utils.DisplayRecognizerState(_recognizerStateLabel, _recognizer.State);
        //Utils.DisplayAudioInputStatus(_audioDeviceStatusLabel, _recognizer.AudioStatus);
        Utils.DisplaySpeechDetected(_speechDetectedLabel, eventArgs.AudioPosition);
};

System.Object
   System.EventArgs
    System.Speech.Recognition.SpeechDetectedEventArgs

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Reference

SpeechDetectedEventArgs Members
System.Speech.Recognition Namespace
System.Speech.Recognition.SpeechRecognitionEngine.AudioStatusChanged
System.Speech.Recognition.SpeechRecognizer.AudioStatusChanged
SpeechRecognizer.SpeechDetected
SpeechRecognitionEngine.SpeechDetected

Community Additions

ADD
Show:
© 2014 Microsoft