PromptStyle Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy PromptStyle.

Przeciążenia

PromptStyle()

Inicjuje nowe wystąpienie klasy PromptStyle.

PromptStyle(PromptEmphasis)

Inicjuje PromptStyle nowe wystąpienie klasy i określa ustawienie wyróżnienia stylu.

PromptStyle(PromptRate)

Inicjuje PromptStyle nowe wystąpienie klasy i określa ustawienie częstotliwości mówienia stylu.

PromptStyle(PromptVolume)

Inicjuje PromptStyle nowe wystąpienie klasy i określa ustawienie dla woluminu mówiącego stylu.

PromptStyle()

Źródło:
PromptStyle.cs
Źródło:
PromptStyle.cs
Źródło:
PromptStyle.cs

Inicjuje nowe wystąpienie klasy PromptStyle.

public:
 PromptStyle();
public PromptStyle ();
Public Sub New ()

Dotyczy

PromptStyle(PromptEmphasis)

Źródło:
PromptStyle.cs
Źródło:
PromptStyle.cs
Źródło:
PromptStyle.cs

Inicjuje PromptStyle nowe wystąpienie klasy i określa ustawienie wyróżnienia stylu.

public:
 PromptStyle(System::Speech::Synthesis::PromptEmphasis emphasis);
public PromptStyle (System.Speech.Synthesis.PromptEmphasis emphasis);
new System.Speech.Synthesis.PromptStyle : System.Speech.Synthesis.PromptEmphasis -> System.Speech.Synthesis.PromptStyle
Public Sub New (emphasis As PromptEmphasis)

Parametry

emphasis
PromptEmphasis

Ustawienie wyróżnienia stylu.

Uwagi

Aparaty syntezy mowy w systemie Windows nie obsługują obecnie zmian nacisku na dane wyjściowe mowy. Ustawienie wartości nacisku PromptEmphasis przy użyciu elementu członkowskiego wyliczenia nie spowoduje słyszalnych zmian w syntetyzowanych danych wyjściowych mowy.

Dotyczy

PromptStyle(PromptRate)

Źródło:
PromptStyle.cs
Źródło:
PromptStyle.cs
Źródło:
PromptStyle.cs

Inicjuje PromptStyle nowe wystąpienie klasy i określa ustawienie częstotliwości mówienia stylu.

public:
 PromptStyle(System::Speech::Synthesis::PromptRate rate);
public PromptStyle (System.Speech.Synthesis.PromptRate rate);
new System.Speech.Synthesis.PromptStyle : System.Speech.Synthesis.PromptRate -> System.Speech.Synthesis.PromptStyle
Public Sub New (rate As PromptRate)

Parametry

rate
PromptRate

Ustawienie współczynnika mówienia stylu.

Przykłady

Poniższy przykład tworzy PromptBuilder obiekt i dołącza ciągi tekstowe. W przykładzie użyto konstruktora PromptStyle jako argumentu do StartStyle metody w celu określenia niskiej liczby mówień dla dodawanego ciągu, który wylicza zawartość zamówienia.

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

Dotyczy

PromptStyle(PromptVolume)

Źródło:
PromptStyle.cs
Źródło:
PromptStyle.cs
Źródło:
PromptStyle.cs

Inicjuje PromptStyle nowe wystąpienie klasy i określa ustawienie dla woluminu mówiącego stylu.

public:
 PromptStyle(System::Speech::Synthesis::PromptVolume volume);
public PromptStyle (System.Speech.Synthesis.PromptVolume volume);
new System.Speech.Synthesis.PromptStyle : System.Speech.Synthesis.PromptVolume -> System.Speech.Synthesis.PromptStyle
Public Sub New (volume As PromptVolume)

Parametry

volume
PromptVolume

Ustawienie głośności (głośność) stylu.

Przykłady

W poniższym przykładzie użyto konstruktora PromptStyle do określenia ustawień woluminu SpeechSynthesizer , które mają być stosowane do danych wyjściowych mowy.

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.StartStyle(new PromptStyle(PromptVolume.Default));  
        builder.AppendText("This is the default speaking volume.");  
        builder.EndStyle();  
        builder.AppendBreak();  
        builder.StartStyle(new PromptStyle(PromptVolume.ExtraLoud));  
        builder.AppendText("This is the extra-loud speaking volume.");  
        builder.EndStyle();  
        builder.AppendBreak();  
        builder.StartStyle(new PromptStyle(PromptVolume.Medium));  
        builder.AppendText("This is the medium speaking volume.");  
        builder.EndStyle();  

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

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

Uwagi

Ustawienie Default dla PromptVolume parametru to pełny wolumin, który jest taki sam jak ExtraLoud. Inne ustawienia zmniejszają ilość danych wyjściowych mowy względem pełnego woluminu.

Zobacz też

Dotyczy