RecognizerInfo.Id 속성

정의

SpeechRecognizer 또는 SpeechRecognitionEngine 인스턴스에 대한 식별자를 가져옵니다.

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

속성 값

String

특정 SpeechRecognizer 또는 SpeechRecognitionEngine 인스턴스의 식별자를 반환합니다.

예제

다음 예제에서는 구현에 있는 모든 정보를 표시 하는 단추 클릭을 RecognizerInfo 인스턴스. 이 예제에서는 사용 합니다 Id 인식 엔진 구성의 식별자 문자열을 가져올 속성 다음에 표시는 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));  
}  

설명

반환 된 식별자는 Id 속성은 Windows 레지스트리에서 인식 엔진의 토큰 이름을 동일 합니다.

적용 대상

추가 정보