Language

PromptStyle コンストラクター

定義

PromptStyle クラスの新しいインスタンスを初期化します。

オーバーロード

Name 説明
PromptStyle()

PromptStyle クラスの新しいインスタンスを初期化します。

PromptStyle(PromptEmphasis)

PromptStyle クラスの新しいインスタンスを初期化し、スタイルの強調の設定を指定します。

PromptStyle(PromptRate)

PromptStyle クラスの新しいインスタンスを初期化し、スタイルの読み上げ速度の設定を指定します。

PromptStyle(PromptVolume)

PromptStyle クラスの新しいインスタンスを初期化し、スタイルの読み上げボリュームの設定を指定します。

PromptStyle()

ソース:
PromptStyle.cs
ソース:
PromptStyle.cs
ソース:
PromptStyle.cs
ソース:
PromptStyle.cs

PromptStyle クラスの新しいインスタンスを初期化します。

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

適用対象

PromptStyle(PromptEmphasis)

ソース:
PromptStyle.cs
ソース:
PromptStyle.cs
ソース:
PromptStyle.cs
ソース:
PromptStyle.cs

PromptStyle クラスの新しいインスタンスを初期化し、スタイルの強調の設定を指定します。

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)

パラメーター

emphasis
PromptEmphasis

スタイルの強調の設定。

注釈

Windows の音声合成エンジンでは、現時点では音声出力の強調のバリエーションはサポートされていません。 PromptEmphasis列挙体のメンバーを使用して強調する値を設定すると、合成された音声出力に聞こえる変化は生じなくなります。

適用対象

PromptStyle(PromptRate)

ソース:
PromptStyle.cs
ソース:
PromptStyle.cs
ソース:
PromptStyle.cs
ソース:
PromptStyle.cs

PromptStyle クラスの新しいインスタンスを初期化し、スタイルの読み上げ速度の設定を指定します。

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)

パラメーター

rate
PromptRate

スタイルの読み上げ速度の設定。

例

次の例では、 PromptBuilder オブジェクトを作成し、テキスト文字列を追加します。 この例では、 PromptStyle コンストラクターを 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();
    }
  }
}

適用対象

PromptStyle(PromptVolume)

ソース:
PromptStyle.cs
ソース:
PromptStyle.cs
ソース:
PromptStyle.cs
ソース:
PromptStyle.cs

PromptStyle クラスの新しいインスタンスを初期化し、スタイルの読み上げボリュームの設定を指定します。

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)

パラメーター

volume
PromptVolume

スタイルの音量 (ラウドネス) の設定。

例

次の例では、 PromptStyle コンストラクターを使用して、 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.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();
    }
  }
}

注釈

DefaultのPromptVolume設定はフル ボリュームであり、ExtraLoudと同じです。 その他の設定では、音声出力のボリュームがフル ボリュームに対して減少します。

関連項目

適用対象