PromptBuilder.StartParagraph 메서드

정의

PromptBuilder 개체에서 단락의 시작을 지정하고 선택적으로 언어를 지정합니다.

오버로드

StartParagraph(CultureInfo)

PromptBuilder 개체의 지정된 문화에서 단락의 시작을 지정합니다.

StartParagraph()

PromptBuilder 개체에서 단락의 시작을 지정합니다.

설명

긴 프롬프트를 문장과 단락으로 나눌 경우 휴먼 음성 처럼 렌더링할 수 있습니다.

StartParagraph(CultureInfo)

PromptBuilder 개체의 지정된 문화에서 단락의 시작을 지정합니다.

public:
 void StartParagraph(System::Globalization::CultureInfo ^ culture);
public void StartParagraph (System.Globalization.CultureInfo culture);
member this.StartParagraph : System.Globalization.CultureInfo -> unit
Public Sub StartParagraph (culture As CultureInfo)

매개 변수

culture
CultureInfo

해당 언어, 문화권의 이름, 쓰기 체계, 사용 달력과 날짜 서식 지정 및 문자열 정렬 방법 등 특정 문화권에 대한 정보를 제공합니다.

설명

긴 프롬프트를 문장과 단락으로 나눌 경우 휴먼 음성 처럼 렌더링할 수 있습니다.

culture단락에 대 한 매개 변수는 해당 매개 변수를 Culture PromptBuilder 포함 하는 개체의 속성과 다를 수 있습니다. 적용 되는 동안 매개 변수 값은 culture 속성을 재정의 합니다 Culture . 는 SpeechSynthesizer culture 단락을 말하기 위해 매개 변수로 지정 된 언어를 지 원하는 설치 된 음성을 선택 하려고 합니다. 지정 된 문화권의 음성을 찾은 경우 사용 됩니다. 지정 된 문화권의 음성을 찾을 수 없으면 기본 음성이 사용 됩니다. 로 지정 된 음성 사용을 중지 하려면 StartParagraph 를 호출 EndParagraph 합니다.

매개 변수로 지정 된 언어로 단어를 정확 하 게 발음 하려면 culture 언어를 지 원하는 음성 합성 (텍스트 음성 변환 또는 TTS) 엔진을 설치 해야 합니다. 설치 된 TTS 엔진을 음성 이라고 합니다. 특정 문화권에 대해 설치 된 음성에 대 한 정보를 가져오려면 메서드를 사용 GetInstalledVoices 합니다.

Microsoft Windows 및 System. Speech API 유효한 모든 언어 국가 코드를에 대 한 값으로 적용 합니다 culture . Windows 7과 함께 제공 되는 TTS 엔진은 다음과 같은 언어 국가 코드를 지원 합니다.

  • EN-US입니다. 영어(미국)

  • zh-CN. 중국어(중국)

  • zh-TW. 중국어(대만)

"En"와 같은 두 문자 언어 코드도 허용 됩니다.

적용 대상

StartParagraph()

PromptBuilder 개체에서 단락의 시작을 지정합니다.

public:
 void StartParagraph();
public void StartParagraph ();
member this.StartParagraph : unit -> unit
Public Sub StartParagraph ()

예제

다음 예제에서는 개체를 만들고 PromptBuilder 콘텐츠를 추가 하 고 단락 및 문장으로 콘텐츠를 구성 합니다.

using System;  
using System.Speech.Synthesis;  

namespace SampleSynthesis  
{  
  class Program  
  {  
    static void Main(string[] args)  
    {  

      // Initialize a new instance of the SpeechSynthesizer.  
      using (SpeechSynthesizer synth = new SpeechSynthesizer())  
      {  

        // Configure the audio output.   
        synth.SetOutputToDefaultAudioDevice();  

        // Create a PromptBuilder object and add content as paragraphs and sentences.  
        PromptBuilder parSent = new PromptBuilder();  
        parSent.StartParagraph();  
        parSent.StartSentence();  
        parSent.AppendText("Introducing the sentence element.");  
        parSent.EndSentence();  
        parSent.StartSentence();  
        parSent.AppendText("You can use it to mark individual sentences.");  
        parSent.EndSentence();  
        parSent.EndParagraph();  
        parSent.StartParagraph();  
        parSent.AppendText("Another simple paragraph. Sentence structure in this paragraph" +  
          "is not explicitly marked.");  
        parSent.EndParagraph();  

        // Speak the contents of the SSML prompt.  
        synth.Speak(parSent);  
      }  

      Console.WriteLine();  
      Console.WriteLine("Press any key to exit...");  
      Console.ReadKey();  
    }  
  }  
}  

설명

긴 프롬프트를 문장과 단락으로 나눌 경우 휴먼 음성 처럼 렌더링할 수 있습니다.

적용 대상