PromptBreak PromptBreak PromptBreak PromptBreak Enum


枚举字边界之间韵律分离(中断)间隔的值。Enumerates values for intervals of prosodic separation (breaks) between word boundaries.

public enum class PromptBreak
public enum PromptBreak
type PromptBreak = 
Public Enum PromptBreak


ExtraLarge ExtraLarge ExtraLarge ExtraLarge 5

指示超大型中断。Indicates an extra-large break.

ExtraSmall ExtraSmall ExtraSmall ExtraSmall 1

指示超小型中断。Indicates an extra-small break.

Large Large Large Large 4

指示大型中断。Indicates a large break.

Medium Medium Medium Medium 3

指示中型中断。Indicates a medium break.

None None None None 0

指示不中断。Indicates no break.

Small Small Small Small 2

指示小型中断。Indicates a small break.


下面的示例生成一个提示, 其中包含两个用中断分隔的句子, 并将提示讲述到计算机上的默认音频设备。The following example builds a prompt containing two sentences separated by a break and speaks the prompt to the default audio device on the computer.

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.   
        // Build a prompt with two sentences separated by a break.  
        PromptBuilder builder = new PromptBuilder(  
          new System.Globalization.CultureInfo("en-US"));  
          "Tonight's movie showings in theater A are at 5:45, 7:15, and 8:45.");  
          "Tonight's movie showings in theater B are at 5:15, 7:30, and 9:15.");  
        // Speak the prompt.  
      Console.WriteLine("Press any key to exit...");  


PromptBreak枚举中的值表示单词边界之间的分隔间隔 (暂停) 范围。The values in the PromptBreak enumeration represent a range of separation intervals (pauses) between word boundaries. 语音合成引擎确定间隔的确切持续时间。The speech synthesis engine determines the exact duration of the interval. 当请求中断时, 这些值中的一个值将传递给文本语音转换 (TTS) 引擎, 其中包含这些值和相应的毫秒分隔符值之间的映射。When a break is requested, one of these values is passed to the text-to-speech (TTS) engine, which contains a mapping between these values and the corresponding millisecond break values.

该值None表示在单词边界之间缺少暂停, 并且可用于删除通常发生的中断。The value None represents the absence of a pause between word boundaries and can be used to remove a break where one would normally occur. 其余值按中断的递增持续时间顺序列出。The remaining values are listed in order of increasing durations for breaks.