Del via


RecognizerInfo.Description Property

Definition

Gets the description of a SpeechRecognizer or SpeechRecognitionEngine instance.

public:
 property System::String ^ Description { System::String ^ get(); };
public string Description { get; }
member this.Description : string
Public ReadOnly Property Description As String

Property Value

Returns a string that describes the configuration for a specific SpeechRecognizer or SpeechRecognitionEngine instance.

Examples

The following example below implements a button click that displays all the information in a RecognizerInfo instance. The example uses the Description property to obtain the description of a speech recognition engine configuration, and then displays it in a 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));  
}  

Applies to

See also