AudioSignalProblem 列舉

定義

包含傳入至語音辨識引擎的音訊訊號中可能發生的問題的清單。Contains a list of possible problems in the audio signal coming in to a speech recognition engine.

public enum class AudioSignalProblem
public enum AudioSignalProblem
type AudioSignalProblem = 
Public Enum AudioSignalProblem
繼承
AudioSignalProblem

欄位

None 0

音效輸入沒有問題。No problems with audio input.

NoSignal 2

偵測不到音訊輸入。Audio input is not detected.

TooFast 5

音訊輸入太快。Audio input is too fast.

TooLoud 3

音訊輸入太大聲。Audio input is too loud.

TooNoisy 1

音訊輸入有太多背景雜音。Audio input has too much background noise.

TooSlow 6

音訊輸入太慢。Audio input is too slow.

TooSoft 4

音訊輸入太小聲。Audio input is too quiet.

範例

下列範例會定義事件處理常式, 以收集AudioSignalProblemOccurred事件的相關資訊。The following example defines an event handler that gathers information about an AudioSignalProblemOccurred event.

  
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.  
}  
  

備註

屬性AudioSignalProblemOccurredEventArgs.AudioSignalProblemSpeechRecognitionEngine在或SpeechRecognizer 引發AudioSignalProblemOccurred事件時, 取得這個列舉的成員。The AudioSignalProblemOccurredEventArgs.AudioSignalProblem property gets a member of this enumeration when the SpeechRecognitionEngine or SpeechRecognizer raises a AudioSignalProblemOccurred event.

適用於

另請參閱