AudioStateChangedEventArgs
AudioStateChangedEventArgs
AudioStateChangedEventArgs
AudioStateChangedEventArgs
Class
Definition
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
- Inheritance
Examples
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.
}
Remarks
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.
Properties
AudioState AudioState AudioState AudioState |
Gets the new state of audio input to the recognizer. |
Methods
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
Feedback
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.
Loading feedback...