RecognizedPhrase 클래스

정의

음성 인식기에서 생성된, 인식된 입력에 대한 자세한 정보를 포함합니다.

public ref class RecognizedPhrase
[System.Serializable]
public class RecognizedPhrase
public class RecognizedPhrase
[<System.Serializable>]
type RecognizedPhrase = class
type RecognizedPhrase = class
Public Class RecognizedPhrase
상속
RecognizedPhrase
파생
특성

예제

다음 예제에 대 한 처리기를 보여 줍니다.는 SpeechRecognitionEngine.SpeechRecognized, SpeechRecognizer.SpeechRecognized, 또는 Grammar.SpeechRecognized 이벤트와 관련 된 정보 중 일부는 RecognitionResult 개체입니다. RecognitionResult 클래스는 RecognizedPhrase 클래스에서 파생됩니다.

void SpeechRecognizedHandler(object sender, SpeechRecognizedEventArgs e)  
{  
  if (e.Result == null) return;  

  // Add event handler code here.  

  // The following code illustrates some of the information available  
  // in the recognition result.  
  Console.WriteLine("Recognition result summary:");  
  Console.WriteLine(  
    "  Recognized phrase: {0}\n" +   
    "  Confidence score {1}\n" +   
    "  Grammar used: {2}\n",   
    e.Result.Text, e.Result.Confidence, e.Result.Grammar.Name);  

  // Display the semantic values in the recognition result.  
  Console.WriteLine("  Semantic results:");  
  foreach (KeyValuePair<String, SemanticValue> child in e.Result.Semantics)  
  {  
    Console.WriteLine("    The {0} city is {1}",  
      child.Key, child.Value.Value ?? "null");  
  }  
  Console.WriteLine();  

  // Display information about the words in the recognition result.  
  Console.WriteLine("  Word summary: ");  
  foreach (RecognizedWordUnit word in e.Result.Words)  
  {  
    Console.WriteLine(  
      "    Lexical form ({1})" +  
      " Pronunciation ({0})" +  
      " Display form ({2})",  
      word.Pronunciation, word.LexicalForm, word.DisplayAttributes);  
  }  

  // Display information about the audio in the recognition result.  
  Console.WriteLine("  Input audio summary:\n" +  
    "    Candidate Phrase at:       {0} mSec\n" +  
    "    Phrase Length:             {1} mSec\n" +  
    "    Input State Time:          {2}\n" +  
    "    Input Format:              {3}\n",  
    e.Result.Audio.AudioPosition,  
    e.Result.Audio.Duration,  
    e.Result.Audio.StartTime,  
    e.Result.Audio.Format.EncodingFormat);  

  // Display information about the alternate recognitions in the recognition result.  
  Console.WriteLine("  Alternate phrase collection:");  
  foreach (RecognizedPhrase phrase in e.Result.Alternates)  
  {  
    Console.WriteLine("    Phrase: " + phrase.Text);  
    Console.WriteLine("    Confidence score: " + phrase.Confidence);  
  }  
}  

설명

이 클래스는 단어와 구에 적용 하는 동안 다음과 같은 음성 인식 작업을 처리 하는 방법에 대 한 자세한 정보를 포함 합니다.

  • 합니다 Grammar 속성 참조는 Grammar 인식기에서 입력을 식별 하는 데 사용 합니다.

  • Text 속성 구에 대 한 정규화 된 텍스트를 포함 합니다.

  • Semantics 결과에 포함 된 의미 체계 정보를 참조 하는 속성입니다. 의미 체계 정보에는 키 이름 및 연결 된 의미 체계 데이터의 사전입니다.

  • 합니다 Words 속성의 정렬된 된 컬렉션이 포함 RecognizedWordUnit 각각 나타내는 개체를 입력의 단어를 인식 합니다. 각 단어 단위 표시 형식, 어휘 형식 및 해당 단어의 발음 정보를 포함합니다.

  • ReplacementWordUnits 특별 한 단어 대체 하는 방법에 대 한 정보를 포함 하는 속성입니다.

  • 합니다 HomophonesHomophoneGroupId 속성 동일 하거나 유사한 발음을 가진 인식 대체 항목에 대 한 정보를 포함 합니다.

  • 속성 값 Confidence 은 인식된 구가 입력과 일치하는 음성 인식기에서 할당한 확실성을 나타냅니다.

음성 인식기에서 인식 결과 반환 합니다.는 RecognitionResult 개체에서 상속 되는 RecognizedPhrase합니다. 인식 결과 Alternates 속성의 정렬된 된 컬렉션이 포함 RecognizedPhrase 된 인식기에 대 한 입력에 대 한 가능한 일치 하는 개체입니다.

속성

Confidence

RecognizedPhrase가 지정된 입력과 일치할 가능성을 나타내는 값(인식자가 할당)을 가져옵니다.

Grammar

음성 인식기에서 RecognizedPhrase를 반환하는 데 사용한 Grammar을 가져옵니다.

HomophoneGroupId

구에 대한 동음이의어 그룹의 식별자를 가져옵니다.

Homophones

이 인식된 구와 동일한 발음을 가진 인식 대체 항목의 컬렉션을 가져옵니다.

ReplacementWordUnits

음성 인식기에서 음성-텍스트 정규화의 일부로 변경된 텍스트에 대한 정보를 가져옵니다.

Semantics

인식된 구와 관련된 의미 체계 정보를 가져옵니다.

Text

음성 인식기에서 인식된 입력으로 생성한 정규화된 텍스트를 가져옵니다.

Words

음성 인식기에서 인식된 입력으로 생성한 단어를 가져옵니다.

메서드

ConstructSmlFromSemantics()

RecognizedPhrase 개체를 통해 의미 체계 정보에 대한 SML(Semantic Markup Language) 문서를 반환합니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보