RecognizerInfo.Id Property

Gets the ID of a SpeechRecognitionEngine.

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

Syntax

'Declaration




Property Value

Returns a string identifying a particular SpeechRecognitionEngine configuration.

Example

The example below implements a button click which displays all the information in a RecognizerInfo instance, including the identifier string of a recognition engine configuration obtained from Id, in a Windows.Forms.MessageBox.

private void recognizerInfoButton_Click(object sender, EventArgs e) {
  RecognizerInfo info = _recognizer.RecognizerInfo;
  string AudioFormats = "";
  foreach (SpeechAudioFormatInfo fmt in info.SupportedAudioFormats) {
    AudioFormats += String.Format("       {0}\n",
  fmt.EncodingFormat.ToString());
  }
  string AdditionalInfo = "";
  foreach (string key in info.AdditionalInfo.Keys) {
    AdditionalInfo += String.Format("      {0}: {1}\n", key, info.AdditionalInfo[key]);
  }
  MessageBox.Show(String.Format(
                                "Name:                 {0 }\n" +
                                "Description:          {1} \n" +
                                "SupportedAudioFormats:\n" +
                                "{2} " +
                                "Culture:              {3} \n" +
                                "AdditionalInfo:       \n" +
                                " {4}\n",
                                info.Name.ToString(),
                                info.Description.ToString(),
                                AudioFormats,
                                info.Culture.ToString(),
                               AdditionalInfo));
}

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

See Also

Reference

RecognizerInfo Class
RecognizerInfo Members
Microsoft.Speech.Recognition Namespace
RecognizerInfo Class
SpeechRecognizer
SpeechRecognitionEngine