共用方式為


AudioSignalProblem 列舉

定義

包含傳入至語音辨識引擎的音訊訊號中可能發生的問題的清單。

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

欄位

None 0

音效輸入沒有問題。

NoSignal 2

偵測不到音訊輸入。

TooFast 5

音訊輸入太快。

TooLoud 3

音訊輸入太大聲。

TooNoisy 1

音訊輸入有太多背景雜音。

TooSlow 6

音訊輸入太慢。

TooSoft 4

音訊輸入太小聲。

範例

下列範例會定義可收集事件相關資訊的 AudioSignalProblemOccurred 事件處理常式。

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

備註

當 或 SpeechRecognizer 引發 AudioSignalProblemOccurred 事件時 SpeechRecognitionEngine ,屬性 AudioSignalProblemOccurredEventArgs.AudioSignalProblem 會取得這個列舉的成員。

適用於

另請參閱