Share via


PromptStyle Class

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Defines a style of prompting that consists of settings for emphasis, rate, and volume.

Namespace: Microsoft.SpeechServer.Synthesis
Assembly: Microsoft.SpeechServer (in microsoft.speechserver.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public NotInheritable Class PromptStyle
[SerializableAttribute] 
public sealed class PromptStyle

Inheritance Hierarchy

System.Object
????Microsoft.SpeechServer.Synthesis.PromptStyle

Example

The following example defines two PromptStyle objects and plays a prompt in each style. The DefaultPromptStyle object in this example uses the default settings for emphasis, rate, and volume. The WarningPromptStyle object in this example uses specific values for emphasis, rate, and volume.

using Microsoft.SpeechServer.Synthesis;
        . . .
        PromptStyle DefaultPromptStyle;
        PromptStyle WarningPromptStyle;
        . . .
        private void codeActivity1_ExecuteCode(object sender, EventArgs e)
        {
            DefaultPromptStyle = new PromptStyle();

            WarningPromptStyle = new PromptStyle();
            WarningPromptStyle.Emphasis = PromptEmphasis.Strong;
            WarningPromptStyle.Rate = PromptRate.Slow;
            WarningPromptStyle.Volume = PromptVolume.Loud;
        }

        private void statementActivity1_TurnStarting(object sender, TurnStartingEventArgs e)
        {
            PromptBuilder pb1 = new PromptBuilder();

            pb1.StartStyle(WarningPromptStyle);
            pb1.AppendText("This is a prompt using the Warning Prompt Style");
            pb1.EndStyle();
            statementActivity1.MainPrompt.AppendPromptBuilder(pb1);
        }

        private void statementActivity2_TurnStarting(object sender, TurnStartingEventArgs e)
        {
            PromptBuilder pb2 = new PromptBuilder();

            pb2.StartStyle(DefaultPromptStyle);
            pb2.AppendText("This is a prompt using the Default Prompt Style");
            pb2.EndStyle();
            statementActivity2.MainPrompt.AppendPromptBuilder(pb2);
        }

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

Windows Server 2003

See Also

Reference

PromptStyle Members
Microsoft.SpeechServer.Synthesis Namespace