PromptBuilder.AppendText 메서드

정의

PromptBuilder 개체에 텍스트를 추가합니다.

오버로드

AppendText(String)

PromptBuilder 개체에 추가할 텍스트를 지정합니다.

AppendText(String, PromptEmphasis)

텍스트를 PromptBuilder 개체에 추가하고 텍스트의 강조 정도를 지정합니다.

AppendText(String, PromptRate)

텍스트를 PromptBuilder 개체에 추가하고 텍스트의 읽기 속도를 지정합니다.

AppendText(String, PromptVolume)

텍스트를 PromptBuilder 개체에 추가하고 텍스트를 읽을 볼륨을 지정합니다.

AppendText(String)

Source:
PromptBuilder.cs
Source:
PromptBuilder.cs
Source:
PromptBuilder.cs

PromptBuilder 개체에 추가할 텍스트를 지정합니다.

public:
 void AppendText(System::String ^ textToSpeak);
public void AppendText (string textToSpeak);
member this.AppendText : string -> unit
Public Sub AppendText (textToSpeak As String)

매개 변수

textToSpeak
String

읽을 텍스트가 들어 있는 문자열입니다.

예제

다음 예제에서는 개체를 PromptBuilder 만들고 메서드를 사용하여 텍스트 문자열을 AppendText 추가합니다.

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 append a text string.  
        PromptBuilder speakText = new PromptBuilder();  
        speakText.AppendText("Say the name of the song you want to hear");  

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

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

설명

SSML 태그 언어로 서식이 지정된 텍스트를 추가하려면 를 사용합니다 AppendSsmlMarkup.

적용 대상

AppendText(String, PromptEmphasis)

Source:
PromptBuilder.cs
Source:
PromptBuilder.cs
Source:
PromptBuilder.cs

텍스트를 PromptBuilder 개체에 추가하고 텍스트의 강조 정도를 지정합니다.

public:
 void AppendText(System::String ^ textToSpeak, System::Speech::Synthesis::PromptEmphasis emphasis);
public void AppendText (string textToSpeak, System.Speech.Synthesis.PromptEmphasis emphasis);
member this.AppendText : string * System.Speech.Synthesis.PromptEmphasis -> unit
Public Sub AppendText (textToSpeak As String, emphasis As PromptEmphasis)

매개 변수

textToSpeak
String

읽을 텍스트가 들어 있는 문자열입니다.

emphasis
PromptEmphasis

텍스트에 적용할 강조 또는 스트레스 값입니다.

설명

Windows의 음성 합성 엔진은 현재 강조 매개 변수를 지원하지 않습니다. 강조 매개 변수에 대한 값을 설정하면 합성된 음성 출력에서 가청 변경 내용이 생성되지 않습니다.

적용 대상

AppendText(String, PromptRate)

Source:
PromptBuilder.cs
Source:
PromptBuilder.cs
Source:
PromptBuilder.cs

텍스트를 PromptBuilder 개체에 추가하고 텍스트의 읽기 속도를 지정합니다.

public:
 void AppendText(System::String ^ textToSpeak, System::Speech::Synthesis::PromptRate rate);
public void AppendText (string textToSpeak, System.Speech.Synthesis.PromptRate rate);
member this.AppendText : string * System.Speech.Synthesis.PromptRate -> unit
Public Sub AppendText (textToSpeak As String, rate As PromptRate)

매개 변수

textToSpeak
String

읽을 텍스트가 들어 있는 문자열입니다.

rate
PromptRate

텍스트에 적용할 말하기 속도 값입니다.

예제

다음 예제에서는 PromptBuilder 개체 및 텍스트 문자열을 추가 합니다. 이 예제에서는 메서드를 AppendText 사용하여 추가되는 문자열에 대해 느린 말하기 속도를 지정하여 주문 내용을 열거합니다.

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.  
        PromptBuilder speakRate = new PromptBuilder();  
        speakRate.AppendText("Your order for");  
        speakRate.AppendText("one kitchen sink and one faucet", PromptRate.Slow);  
        speakRate.AppendText("has been confirmed.");  

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

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

적용 대상

AppendText(String, PromptVolume)

Source:
PromptBuilder.cs
Source:
PromptBuilder.cs
Source:
PromptBuilder.cs

텍스트를 PromptBuilder 개체에 추가하고 텍스트를 읽을 볼륨을 지정합니다.

public:
 void AppendText(System::String ^ textToSpeak, System::Speech::Synthesis::PromptVolume volume);
public void AppendText (string textToSpeak, System.Speech.Synthesis.PromptVolume volume);
member this.AppendText : string * System.Speech.Synthesis.PromptVolume -> unit
Public Sub AppendText (textToSpeak As String, volume As PromptVolume)

매개 변수

textToSpeak
String

읽을 텍스트가 들어 있는 문자열입니다.

volume
PromptVolume

텍스트에 적용할 말하기 볼륨(크기) 값입니다.

예제

다음 예제에서는 메서드를 AppendText 사용하여 가 음성 출력에 적용해야 하는 SpeechSynthesizer 볼륨 설정을 지정합니다.

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();  

        // Build a prompt that applies different volume settings.  
        PromptBuilder builder = new PromptBuilder();  
        builder.AppendText("This is the default speaking volume.", PromptVolume.Default);  
        builder.AppendBreak();  
        builder.AppendText("This is the extra loud speaking volume.", PromptVolume.ExtraLoud);  
        builder.AppendBreak();  
        builder.AppendText("This is the medium speaking volume.", PromptVolume.Medium);  

        // Speak the prompt.  
        synth.Speak(builder);  
      }  

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

설명

합니다 Default 에 대 한 설정 PromptVolume 은 동일한 전체 볼륨으로 ExtraLoud입니다. 다른 설정은 전체 볼륨을 기준으로 음성 출력의 볼륨을 줄입니다.

적용 대상