Bagikan melalui


AudioSignalProblem Enum

Definisi

Berisi daftar kemungkinan masalah dalam sinyal audio yang masuk ke mesin pengenalan ucapan.

public enum class AudioSignalProblem
public enum AudioSignalProblem
type AudioSignalProblem = 
Public Enum AudioSignalProblem
Warisan
AudioSignalProblem

Bidang

None 0

Tidak ada masalah dengan input audio.

NoSignal 2

Input audio tidak terdeteksi.

TooFast 5

Input audio terlalu cepat.

TooLoud 3

Input audio terlalu keras.

TooNoisy 1

Input audio memiliki terlalu banyak kebisingan latar belakang.

TooSlow 6

Input audio terlalu lambat.

TooSoft 4

Input audio terlalu tenang.

Contoh

Contoh berikut mendefinisikan penanganan aktivitas yang mengumpulkan informasi tentang suatu AudioSignalProblemOccurred peristiwa.

private SpeechRecognitionEngine sre;  

// Initialize the speech recognition engine.  
private void Initialize()  
{  
  sre = new SpeechRecognitionEngine();  

  // Add a handler for the AudioSignalProblemOccurred event.  
  sre.AudioSignalProblemOccurred += new EventHandler<AudioSignalProblemOccurredEventArgs>(sre_AudioSignalProblemOccurred);  
}  

// Gather information when the AudioSignalProblemOccurred event is raised.  
void sre_AudioSignalProblemOccurred(object sender, AudioSignalProblemOccurredEventArgs e)  
{  
  StringBuilder details = new StringBuilder();  

  details.AppendLine("Audio signal problem information:");  
  details.AppendFormat(  
    " Audio level:               {0}" + Environment.NewLine +  
    " Audio position:            {1}" + Environment.NewLine +  
    " Audio signal problem:      {2}" + Environment.NewLine +  
    " Recognition engine audio position: {3}" + Environment.NewLine,  
    e.AudioLevel, e.AudioPosition, e.AudioSignalProblem,  
    e.recoEngineAudioPosition);  

  // Insert additional event handler code here.  
}  

Keterangan

Properti AudioSignalProblemOccurredEventArgs.AudioSignalProblem mendapatkan anggota enumerasi ini ketika SpeechRecognitionEngine atau SpeechRecognizer menaikkan AudioSignalProblemOccurred acara.

Berlaku untuk

Lihat juga