RecognizerInfo.Name Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the friendly name of a SpeechRecognizer or SpeechRecognitionEngine instance.
public:
property System::String ^ Name { System::String ^ get(); };
public string Name { get; }
member this.Name : string
Public ReadOnly Property Name As String
Property Value
Returns the friendly name for a specific SpeechRecognizer or SpeechRecognitionEngine instance.
Examples
The following example implements a button click that displays all the information in a RecognizerInfo instance. The example uses the Name property to obtain the friendly name of a 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
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET