PromptBuilder.StartStyle(PromptStyle) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
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 メソッドを呼び出します。
Note
- Windowsの音声合成エンジンは、現時点では強調パラメーターをサポートしていません。 強調パラメーターの値を設定すると、合成された音声出力に聞こえる変化は生じなくなります。
- DefaultのPromptVolume設定はフル ボリュームであり、ExtraLoudと同じです。 その他の設定では、音声出力のボリュームがフル ボリュームに対して減少します。