AudioStateChangedEventArgs AudioStateChangedEventArgs AudioStateChangedEventArgs AudioStateChangedEventArgs Class


Provides data for the AudioStateChanged event of the SpeechRecognizer or the SpeechRecognitionEngine class.

public ref class AudioStateChangedEventArgs : EventArgs
public class AudioStateChangedEventArgs : EventArgs
type AudioStateChangedEventArgs = class
    inherit EventArgs
Public Class AudioStateChangedEventArgs
Inherits EventArgs


The following example demonstrates an event handler for handling the changing audio state of a speech recognition engine.

private SpeechRecognitionEngine sre;  

// Initialize the SpeechRecognitionEngine object.   
private void Initialize()  
  sre = new SpeechRecognitionEngine();  

  // Add a handler for the AudioStateChanged event.  
  sre.AudioStateChanged += new EventHandler<AudioStateChangedEventArgs>(sre_AudioStateChanged);  

  // Add other initialization code here.  

// Handle the AudioStateChanged event.   
void sre_AudioStateChanged(object sender, AudioStateChangedEventArgs e)  
  AudioState newState = e.AudioState;  

  // Handle event here.  


The AudioState property gets a new instance of the AudioState enumeration when a SpeechRecognitionEngine.AudioStateChanged or a SpeechRecognizer.AudioStateChanged event is raised.

You can obtain the current state of the audio input using the AudioState property of the SpeechRecognizer or SpeechRecognitionEngine classes.


AudioState AudioState AudioState AudioState

Gets the new state of audio input to the recognizer.


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also