AudioStateChangedEventArgs AudioStateChangedEventArgs AudioStateChangedEventArgs AudioStateChangedEventArgs Class

Definizione

Fornisce i dati per l'evento AudioStateChanged della classe SpeechRecognizer o 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
Ereditarietà
AudioStateChangedEventArgsAudioStateChangedEventArgsAudioStateChangedEventArgsAudioStateChangedEventArgs

Esempi

Nell'esempio seguente viene illustrato un gestore eventi per la gestione dello stato audio modificato di un motore di riconoscimento vocale.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.  
}  

Commenti

La AudioState proprietà ottiene una nuova istanza AudioState dell' SpeechRecognizer.AudioStateChanged enumerazione quando viene generato SpeechRecognitionEngine.AudioStateChanged 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.

È possibile ottenere lo stato corrente dell'input audio usando la AudioState proprietà SpeechRecognizer delle classi o SpeechRecognitionEngine .You can obtain the current state of the audio input using the AudioState property of the SpeechRecognizer or SpeechRecognitionEngine classes.

Proprietà

AudioState AudioState AudioState AudioState

Ottiene il nuovo stato di input audio per il riconoscimento.Gets the new state of audio input to the recognizer.

Metodi

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

Determina se l'oggetto specificato è uguale all'oggetto corrente.Determines whether the specified object is equal to the current object.

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

Funge da funzione hash predefinita.Serves as the default hash function.

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

Ottiene l'oggetto Type dell'istanza corrente.Gets the Type of the current instance.

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

Crea una copia superficiale dell'oggetto Object corrente.Creates a shallow copy of the current Object.

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

Restituisce una stringa che rappresenta l'oggetto corrente.Returns a string that represents the current object.

(Inherited from Object)

Si applica a

Vedi anche