SpeechRecognitionEngine.SpeechDetected Event

Event raised by recognition engine when speech is detected.

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




The example below shows the subscription of an anonymous method as a handler for SpeechDetected. The handler displays the current state of the recognition engine, including the audio position of the speech that generated the event (Utils.DisplaySpeechDetected).

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



Recognition engines have algorithms able to distinguish between background sound, random noise, and speech.

When the algorithm is satisified, a SpeechDetected is raised.

SpeechDetected events are always be followed by one or more SpeechHypothesized events, and finally by either a SpeechRecognized or SpeechRecognitionRejected event when the recognizer has finished processing the speech.

The position of the audio input to trigger a SpeechDetected event can be obtained by the SpeechDetected handler through the AudioPosition property of the SpeechDetectedEventArgs object passed to the handler.


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


SpeechRecognitionEngine Class
SpeechRecognitionEngine Members
Microsoft.Speech.Recognition Namespace
SpeechRecognitionEngine Class
SpeechDetectedEventArgs Class
RecognitionEventArgs Class
SpeechRecognitionEngine.SpeechDetected Event