AudioSignalProblem Enumeration

Contains a list of possible problems in the audio signal coming in to a speech recognition engine.

Namespace:  Microsoft.Speech.Recognition
Assembly:  Microsoft.Speech (in Microsoft.Speech.dll)

Syntax

'Declaration
Public Enumeration AudioSignalProblem
'Usage
Dim instance As AudioSignalProblem
public enum AudioSignalProblem

Members

Member name Description
None No problems with audio input.
TooNoisy Audio input has too much background noise.
NoSignal Audio input is not detected.
TooLoud Audio input is too loud.
TooSoft Audio input is too quiet.
TooFast Audio input is too fast.
TooSlow Audio input is too slow.

Remarks

The AudioSignalProblem property of the AudioSignalProblemOccurredEventArgs class gets a member of this enumeration when the SpeechRecognitionEngine raises the AudioSignalProblemOccurred event.

Examples

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

See Also

Reference

Microsoft.Speech.Recognition Namespace

AudioSignalProblem