StartStyle Método (PromptStyle)
Este artículo proviene de un motor de traducción automática. Mueva el puntero sobre las frases del artículo para ver el texto original. Más información.

PromptBuilder.StartStyle (Método) (PromptStyle)


Especifica el inicio de un estilo en el objeto PromptBuilder.

Espacio de nombres:   System.Speech.Synthesis
Ensamblado:  System.Speech (en System.Speech.dll)

public void StartStyle(
	PromptStyle style



Estilo que se va a iniciar.

The StartStyle method takes a PromptStyle object as its argument.You can use the properties of the PromptStyle object to set the emphasis, speaking rate, and volume (loudness) to apply to speech output while the style is in effect.To stop using the current style, call the EndStyle method.

  • The speech synthesis engines in Windows do not support the emphasis parameter at this time.Setting values for the emphasis parameter will produce no audible change in the synthesized speech output.

  • The Default setting for PromptVolume is full volume, which is the same as ExtraLoud.The other settings decrease the volume of speech output relative to full volume.

The following example creates a PromptBuilder object and appends text strings.The example uses the StartStyle method to specify a slow speaking rate for the string being added, which enumerates the contents of an order.

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. 

        // 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.AppendText("has been confirmed.");

        // Speak the contents of the SSML prompt.

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

.NET Framework
Disponible desde 3.0
Volver al principio
© 2016 Microsoft