Prompt Class


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Represents information about what can be rendered, either text or an audio file, by the SpeechSynthesizer.

Namespace:   System.Speech.Synthesis
Assembly:  System.Speech (in System.Speech.dll)


public class Prompt


Creates a new instance of the Prompt class from a PromptBuilder object.


Creates a new instance of the Prompt class and specifies the text to be spoken.

System_CAPS_pubmethodPrompt(String, SynthesisTextFormat)

Creates a new instance of the Prompt class and specifies the text to be spoken and whether its format is plain text or markup language.


Gets whether the Prompt has finished playing.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

A Prompt object can contain plain text, text formatted with markup language, or audio files.

An empty Prompt object is created with each new instance of PromptBuilder. The PromptBuilder class provides methods for adding content, including text, SSML markup, bookmarks, and prerecorded audio files (such as .wav files), to the empty Prompt object that it contains. Typically, applications will use PromptBuilder, rather than a Prompt object, to create prompts and populate them with content.

To generate speech from the contents of a Prompt object, use the Speak method.

.NET Framework
Available since 3.0

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

Return to top