AudioStateChangedEventArgs AudioStateChangedEventArgs AudioStateChangedEventArgs AudioStateChangedEventArgs Class

Definición

Proporciona datos para el evento AudioStateChanged de SpeechRecognizer o de la clase SpeechRecognitionEngine.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
Herencia
AudioStateChangedEventArgsAudioStateChangedEventArgsAudioStateChangedEventArgsAudioStateChangedEventArgs

Ejemplos

En el ejemplo siguiente se muestra un controlador de eventos para controlar el estado de audio cambiante de un motor de reconocimiento de voz.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.  
}  
  

Comentarios

La AudioState propiedad obtiene una nueva instancia de la AudioState SpeechRecognizer.AudioStateChanged enumeración cuando SpeechRecognitionEngine.AudioStateChanged se genera un evento o.The AudioState property gets a new instance of the AudioState enumeration when a SpeechRecognitionEngine.AudioStateChanged or a SpeechRecognizer.AudioStateChanged event is raised.

Puede obtener el estado actual de la entrada de audio mediante la AudioState propiedad de las SpeechRecognizer clases SpeechRecognitionEngine o.You can obtain the current state of the audio input using the AudioState property of the SpeechRecognizer or SpeechRecognitionEngine classes.

Propiedades

AudioState AudioState AudioState AudioState

Obtiene el nuevo estado de la entrada de audio al reconocedor.Gets the new state of audio input to the recognizer.

Métodos

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

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

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

Sirve como la función hash predeterminada.Serves as the default hash function.

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

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

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

Crea una copia superficial del objeto Object actual.Creates a shallow copy of the current Object.

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

Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object.

(Inherited from Object)

Se aplica a

Consulte también: