Język

PromptStyle Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy PromptStyle.

Przeciążenia

Nazwisko Opis
PromptStyle()

Inicjuje nowe wystąpienie klasy PromptStyle.

PromptStyle(PromptEmphasis)

Inicjuje PromptStyle nowe wystąpienie klasy i określa ustawienie nacisku stylu.

PromptStyle(PromptRate)

Inicjuje nowe wystąpienie PromptStyle klasy i określa ustawienie dla współczynnika mówienia stylu.

PromptStyle(PromptVolume)

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

PromptStyle()

Źródło:
PromptStyle.cs
Ź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
Źródło:
PromptStyle.cs

Inicjuje PromptStyle nowe wystąpienie klasy i określa ustawienie nacisku 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 różnic w nacisku na dane wyjściowe mowy. Ustawienie wartości nacisku PromptEmphasis przy użyciu elementu członkowskiego wyliczenia nie spowoduje słyszalnego zmiany w syntetyzowanych danych wyjściowych mowy.

Dotyczy

PromptStyle(PromptRate)

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

Inicjuje nowe wystąpienie PromptStyle klasy i określa ustawienie dla współczynnika 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 dla współczynnika mówienia stylu.

Przykłady

Poniższy przykład tworzy PromptBuilder obiekt i dołącza ciągi tekstowe. W tym przykładzie użyto konstruktora PromptStyle jako argumentu do StartStyle metody , aby określić niską szybkość mówienia dla dodawanego ciągu, który wylicza zawartość kolejności.

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
Źródło:
PromptStyle.cs

Inicjuje PromptStyle nowe wystąpienie klasy i określa ustawienie dla mówiącego woluminu 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 do określenia ustawień woluminu PromptStyle , które SpeechSynthesizer 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 dla parametru Default to pełny wolumin, który jest taki sam jak PromptVolume.ExtraLoud Inne ustawienia zmniejszają ilość danych wyjściowych mowy w stosunku do pełnego woluminu.

Zobacz też

Dotyczy