RecognizedWordUnit.Pronunciation 속성

정의

인식된 단어의 발음 기호를 가져옵니다.

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

속성 값

String

IPA(International Phonetic Alphabet), UPS(Universal Phone Set) 등 지원되는 음성 알파벳의 문자열입니다.

예제

다음 예제에서는 세 가지 가능한 형식 중 하나를 사용 하 여 문자열을 생성 하는 유틸리티 루틴: 어휘 (사용 하 여 LexicalForm), 정규화 된 (사용 하 여 Text), 음성 및 (사용 하 여 Pronunciation). 텍스트 출력에서 가져온를 ReadOnlyCollection<T>RecognizedWordUnit 에서 가져온 개체는 Words 속성에는 RecognizedPhrase 개체입니다.

internal enum WordType   
{  
  Text,  
  Normalized = Text,  
  Lexical,  
  Pronunciation  
}  
internal static string stringFromWordArray(  
          ReadOnlyCollection<RecognizedWordUnit> words,   
          WordType type)   
{  
  string text = "";  
  foreach (RecognizedWordUnit word in words)   
  {  
    string wordText = "";  
    if (type == WordType.Text || type == WordType.Normalized)   
    {  
      wordText = word.Text;  
    }   
    else if (type == WordType.Lexical)   
    {  
      wordText = word.LexicalForm;  
    }   
    else if (type == WordType.Pronunciation)   
    {  
      wordText = word.Pronunciation;  
    }   
    else   
    {  
      throw new InvalidEnumArgumentException(  
          String.Format("[0}: is not a valid input", type));  
    }  
    // Use display attribute  

    if ((word.DisplayAttributes & DisplayAttributes.OneTrailingSpace) != 0)   
    {  
      wordText += " ";  
    }  
    if ((word.DisplayAttributes & DisplayAttributes.TwoTrailingSpaces) != 0)   
    {  
      wordText += "  ";  
    }  
    if ((word.DisplayAttributes & DisplayAttributes.ConsumeLeadingSpaces) != 0)   
    {  
      wordText = wordText.TrimStart();  
    }  
    if ((word.DisplayAttributes & DisplayAttributes.ZeroTrailingSpaces) != 0)   
    {  
      wordText = wordText.TrimEnd();  
    }  

    text += wordText;  
  }  
  return text;  
}  

설명

내용의 Pronunciation 음성 인식 엔진의 로드 중 하나를 음성 입력와 일치 하는 데는 발음 나타냅니다 Grammar 개체입니다. 발음을 인식 문법을 로드에서 연결 된 어휘 집 문서의 음성 인식 엔진의 내부 어휘 집에서 정의할 수 있습니다 Grammar 개체나 인식 문법 로드에서 인라인으로 Grammar 개체입니다. 음성 인식 엔진에서 해당 발음 어휘 집 또는 음성 인식 엔진 현재가 액세스할 수 있는 문법에 정의 되어 있지 않은 일반적이 지 않은 단어 발음을 만들 수도 있습니다.

Courier New 같은 많은 Windows 기반 유니코드 글꼴 IPA 문자열 표시를 지원 합니다. 자세한 내용은 International Phonetic Alphabet합니다.

적용 대상

추가 정보