AudioSignalProblem AudioSignalProblem AudioSignalProblem AudioSignalProblem Enum

定义

在转到语音识别引擎的音频信号中包含可能问题列表。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
继承
AudioSignalProblemAudioSignalProblemAudioSignalProblemAudioSignalProblem

字段

None None None None 0

音频输入没有任何问题。No problems with audio input.

NoSignal NoSignal NoSignal NoSignal 2

未检测到音频输入。Audio input is not detected.

TooFast TooFast TooFast TooFast 5

音频输入太快。Audio input is too fast.

TooLoud TooLoud TooLoud TooLoud 3

音频输入太大声。Audio input is too loud.

TooNoisy TooNoisy TooNoisy TooNoisy 1

音频输入具有太多背景噪音。Audio input has too much background noise.

TooSlow TooSlow TooSlow TooSlow 6

音频输入太慢。Audio input is too slow.

TooSoft TooSoft TooSoft 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.AudioSignalProblem 引发事件时SpeechRecognizer , 属性将获取此枚举的成员。 SpeechRecognitionEngine AudioSignalProblemOccurredThe AudioSignalProblemOccurredEventArgs.AudioSignalProblem property gets a member of this enumeration when the SpeechRecognitionEngine or SpeechRecognizer raises a AudioSignalProblemOccurred event.

适用于

另请参阅