PromptBuilder.StartStyle(PromptStyle) 메서드

정의

PromptBuilder 개체에서 스타일의 시작을 지정합니다.

public:
 void StartStyle(System::Speech::Synthesis::PromptStyle ^ style);
public void StartStyle (System.Speech.Synthesis.PromptStyle style);
member this.StartStyle : System.Speech.Synthesis.PromptStyle -> unit
Public Sub StartStyle (style As PromptStyle)

매개 변수

style
PromptStyle

시작할 스타일입니다.

예제

다음 예제에서는 PromptBuilder 개체 및 텍스트 문자열을 추가 합니다. 이 예제에서는 메서드를 사용 하 여 StartStyle 추가 되는 문자열에 대 한 저속 읽어주기 속도를 지정 하며,이는 주문의 내용을 열거 합니다.

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

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

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

설명

StartStyle메서드는 개체를 PromptStyle 인수로 사용 합니다. 스타일을 적용 하는 동안 개체의 속성을 사용 하 여 PromptStyle 강조 표시, 말하는 주기 및 음성 출력에 적용할 볼륨 (크기)을 설정할 수 있습니다. 현재 스타일 사용을 중지 하려면 메서드를 호출 EndStyle 합니다.

참고

  • Windows의 음성 합성 엔진은이 시점에서 강조 매개 변수를 지원 하지 않습니다. 강조 매개 변수의 값을 설정 하면 합성 된 음성 출력이 변경 되지 않습니다.
  • 합니다 Default 에 대 한 설정 PromptVolume 은 동일한 전체 볼륨으로 ExtraLoud입니다. 다른 설정은 전체 볼륨을 기준으로 음성 출력의 볼륨을 줄입니다.

적용 대상