다음을 통해 공유


RecognizedPhrase 클래스

정의

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

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

예제

다음 예제에서는 개체와 연결된 RecognitionResult 정보 및 이벤트 및 일부 정보에 대한 Grammar.SpeechRecognizedSpeechRecognitionEngine.SpeechRecognizedSpeechRecognizer.SpeechRecognized처리기를 보여 있습니다. 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 특수 단어 대체에 대한 정보가 포함되어 있습니다.

  • HomophoneGroupId 속성에는 Homophones 발음이 동일하거나 유사한 인식 대체 항목에 대한 정보가 포함됩니다.

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

음성 인식기에서 RecognizedPhrase상속 되는 개체에서 RecognitionResult 인식 결과 반환 합니다. 인식 결과 Alternates 속성에는 순서가 지정된 개체 컬렉션이 포함되며, 각 컬렉션 RecognizedPhrase 은 인식기의 입력과 일치할 수 있습니다.

속성

Name Description
Confidence

지정된 입력과 일치할 가능성을 나타내는 인식기에서 할당한 RecognizedPhrase 값을 가져옵니다.

Grammar

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

HomophoneGroupId

구에 대한 homophone 그룹의 식별자를 가져옵니다.

Homophones

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

ReplacementWordUnits

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

Semantics

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

Text

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

Words

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

메서드

Name Description
ConstructSmlFromSemantics()

개체의 의미 체계 정보에 RecognizedPhrase 대한 SML(의미 체계 태그 언어) 문서를 반환합니다.

Equals(Object)

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

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

기본 해시 함수로 사용됩니다.

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

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

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

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

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

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

(다음에서 상속됨 Object)

적용 대상

추가 정보