RecognizerInfo.AdditionalInfo Propiedad

Definición

Obtiene la información adicional sobre una instancia de SpeechRecognizer o de SpeechRecognitionEngine.Gets additional information about a SpeechRecognizer or SpeechRecognitionEngine instance.

public:
 property System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ AdditionalInfo { System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ get(); };
public System.Collections.Generic.IDictionary<string,string> AdditionalInfo { get; }
member this.AdditionalInfo : System.Collections.Generic.IDictionary<string, string>
Public ReadOnly Property AdditionalInfo As IDictionary(Of String, String)

Valor de propiedad

IDictionary<String,String>

Devuelve una instancia de IDictionary<TKey,TValue> que contiene información sobre la configuración de un objeto SpeechRecognizer o SpeechRecognitionEngine.Returns an instance of IDictionary<TKey,TValue> containing information about the configuration of a SpeechRecognizer or SpeechRecognitionEngine object.

Ejemplos

En el ejemplo siguiente se implementa un clic de botón que muestra toda la información de un RecognizerInfo objeto en MessageBox .The example below implements a button click which displays all the information in a RecognizerInfo object in a MessageBox.

Los pares clave-valor contenidos en la IDictionary<TKey,TValue> instancia devuelta por AdditionalInfo se concatenan en una tabla de texto.The key/value pairs contained in the IDictionary<TKey,TValue> instance returned by AdditionalInfo are concatenated into a text table.

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));  
}  

Se aplica a

Consulte también