Udostępnij za pośrednictwem


Prompt Class

Definition

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

public ref class Prompt
public class Prompt
type Prompt = class
Public Class Prompt
Inheritance
Prompt
Derived

Remarks

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.

Constructors

Prompt(PromptBuilder)

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

Prompt(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.

Prompt(String)

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

Properties

IsCompleted

Gets whether the Prompt has finished playing.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to