Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

AudioSignalProblem Enumeration

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

Namespace:  System.Speech.Recognition
Assembly:  System.Speech (in System.Speech.dll)
public enum AudioSignalProblem
Member nameDescription
NoneNo problems with audio input.
NoSignalAudio input is not detected.
TooFastAudio input is too fast.
TooLoudAudio input is too loud.
TooNoisyAudio input has too much background noise.
TooSlowAudio input is too slow.
TooSoftAudio input is too quiet.

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

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

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft. All rights reserved.