0 out of 1 rated this helpful - Rate this topic

SpeechRecognitionEngine.InstalledRecognizers Method

Returns a list of all available recognition engines on a system.

Namespace:  System.Speech.Recognition
Assembly:  System.Speech (in System.Speech.dll)
public static ReadOnlyCollection<RecognizerInfo> InstalledRecognizers()

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<RecognizerInfo>
Returns an instance of ReadOnlyCollection containing an instance of RecognizerInfo fully specifying each recognition engine available on a system supporting the Speech platform.

The example below queries the system using InstalledRecognizers to find a recognition engine with the identification string and CultureID.

Before before this instance of SpeechRecognitionEngine can be used, it must have its input set, using SetInputToNull, SetInputToWaveStream, or SetInputToDefaultAudioDevice).

private SpeechRecognitionEngine SelectRecognitionEngine(CultureInfo requiredCulture, string requiredId) {
  // Select based on a specific recognitionEngine configuration:
  SpeechRecognitionEngine speechRecognitionEngine=null;
  foreach (RecognzierInfo config in SpeechRecognitionEngine.InstalledRecognizers()) {
    if (config.Culture.Equals(requiredCulture) && config.Id== requiredId) {
      speechRecognitionEngine = new SpeechRecognitionEngine(config);
      break;
    }
    
  }
  return speechRecognitionEngine;
}

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5, 3.0
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ