AudioState AudioState AudioState AudioState Enum

Definición

Contiene una lista de posibles estados de la entrada de audio de un motor de reconocimiento de voz.Contains a list of possible states for the audio input to a speech recognition engine.

public enum class AudioState
public enum AudioState
type AudioState = 
Public Enum AudioState
Herencia

Campos

Silence Silence Silence Silence 1

Recibiendo silencio o ruido de fondo sin voz.Receiving silence or non-speech background noise.

Speech Speech Speech Speech 2

Recibiendo entrada de voz.Receiving speech input.

Stopped Stopped Stopped Stopped 0

No se procesa la entrada de audio.Not processing audio input.

Ejemplos

En el ejemplo siguiente se muestra un controlador de eventos que controla el cambio de estado de audio de un reconocedor de voz.The following example demonstrates an event handler that handles the changing audio state of a speech recognizer.


private SpeechRecognitionEngine sre;  

// Initializes the speech recognition engine.  
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

Puede obtener el estado de entrada de audio del motor de reconocimiento de voz SpeechRecognitionEngine.AudioState con SpeechRecognizer.AudioState las propiedades y.You can obtain the audio input state of the speech recognition engine with the SpeechRecognitionEngine.AudioState and SpeechRecognizer.AudioState properties. Los SpeechRecognitionEngine.AudioStateChanged eventos SpeechRecognizer.AudioStateChanged y se generan cuando cambia el estado de entrada de audio de un motor de reconocimiento de voz.The SpeechRecognitionEngine.AudioStateChanged and SpeechRecognizer.AudioStateChanged events are raised when the audio input state of a speech recognition engine changes.

Se aplica a

Consulte también: