PromptBuilder Class

PromptBuilder Class

 

Creates an empty Prompt object and provides methods for adding content, selecting voices, controlling voice attributes, and controlling the pronunciation of spoken words.

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

System.Object
  System.Speech.Synthesis.PromptBuilder

[SerializableAttribute]
public class PromptBuilder

NameDescription
System_CAPS_pubmethodPromptBuilder()

Creates a new instance of the PromptBuilder class.

System_CAPS_pubmethodPromptBuilder(CultureInfo)

Creates a new instance of the PromptBuilder class and specifies a culture.

NameDescription
System_CAPS_pubpropertyCulture

Gets or sets the culture information for the PromptBuilder object.

System_CAPS_pubpropertyIsEmpty

Gets whether the PromptBuilder is empty.

NameDescription
System_CAPS_pubmethodAppendAudio(String)

Appends the specified audio file to the PromptBuilder.

System_CAPS_pubmethodAppendAudio(Uri)

Appends the audio file at the specified URI to the PromptBuilder.

System_CAPS_pubmethodAppendAudio(Uri, String)

Appends the specified audio file and alternate text to the PromptBuilder.

System_CAPS_pubmethodAppendBookmark(String)

Appends a bookmark to the PromptBuilder object.

System_CAPS_pubmethodAppendBreak()

Appends a break to the PromptBuilder object.

System_CAPS_pubmethodAppendBreak(PromptBreak)

Appends a break to the PromptBuilder object and specifies its strength (duration).

System_CAPS_pubmethodAppendBreak(TimeSpan)

Appends a break of the specified duration to the PromptBuilder object.

System_CAPS_pubmethodAppendPromptBuilder(PromptBuilder)

Appends a PromptBuilder object to another PromptBuilder object.

System_CAPS_pubmethodAppendSsml(String)

Appends the SSML file at the specified path to the PromptBuilder object.

System_CAPS_pubmethodAppendSsml(Uri)

Appends the SSML file at the specified URI to the PromptBuilder object.

System_CAPS_pubmethodAppendSsml(XmlReader)

Appends an XMLReader object that references an SSML prompt to the PromptBuilder object.

System_CAPS_pubmethodAppendSsmlMarkup(String)

Appends the specified string containing SSML markup to the PromptBuilder object.

System_CAPS_pubmethodAppendText(String)

Specifies text to append to the PromptBuilder object.

System_CAPS_pubmethodAppendText(String, PromptEmphasis)

Appends text to the PromptBuilder object and specifies the degree of emphasis for the text.

System_CAPS_pubmethodAppendText(String, PromptRate)

Appends text to the PromptBuilder object and specifies the speaking rate for the text.

System_CAPS_pubmethodAppendText(String, PromptVolume)

Appends text to the PromptBuilder object and specifies the volume to speak the text.

System_CAPS_pubmethodAppendTextWithAlias(String, String)

Appends text to the PromptBuilder object and specifies the alias text to be spoken in place of the appended text.

System_CAPS_pubmethodAppendTextWithHint(String, SayAs)

Appends text to the PromptBuilder object and specifies the content type using a member of the SayAs enumeration.

System_CAPS_pubmethodAppendTextWithHint(String, String)

Appends text to the PromptBuilder object and a String that specifies the content type of the text.

System_CAPS_pubmethodAppendTextWithPronunciation(String, String)

Appends text to the PromptBuilder object and specifies the pronunciation for the text.

System_CAPS_pubmethodClearContent()

Clears the content from the PromptBuilder object.

System_CAPS_pubmethodEndParagraph()

Specifies the end of a paragraph in the PromptBuilder object.

System_CAPS_pubmethodEndSentence()

Specifies the end of a sentence in the PromptBuilder object.

System_CAPS_pubmethodEndStyle()

Specifies the end of a style in the PromptBuilder object.

System_CAPS_pubmethodEndVoice()

Specifies the end of use of a voice in the PromptBuilder object.

System_CAPS_pubmethodEquals(Object)

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

System_CAPS_protmethodFinalize()

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

System_CAPS_pubmethodGetHashCode()

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

System_CAPS_pubmethodGetType()

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

System_CAPS_protmethodMemberwiseClone()

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

System_CAPS_pubmethodStartParagraph()

Specifies the start of a paragraph in the PromptBuilder object.

System_CAPS_pubmethodStartParagraph(CultureInfo)

Specifies the start of a paragraph in the specified culture in the PromptBuilder object.

System_CAPS_pubmethodStartSentence()

Specifies the start of a sentence in the PromptBuilder object.

System_CAPS_pubmethodStartSentence(CultureInfo)

Specifies the start of a sentence in the specified culture in the PromptBuilder object.

System_CAPS_pubmethodStartStyle(PromptStyle)

Specifies the start of a style in the PromptBuilder object.

System_CAPS_pubmethodStartVoice(CultureInfo)

Instructs the synthesizer to change the voice in the PromptBuilder object and specifies the culture of the voice to use.

System_CAPS_pubmethodStartVoice(String)

Instructs the synthesizer to change the voice in the PromptBuilder object and specifies the name of the voice to use.

System_CAPS_pubmethodStartVoice(VoiceGender)

Instructs the synthesizer to change the voice in the PromptBuilder object and specifies the gender of the voice to use.

System_CAPS_pubmethodStartVoice(VoiceGender, VoiceAge)

Instructs the synthesizer to change the voice in the PromptBuilder object and specifies the gender and the age of the new voice.

System_CAPS_pubmethodStartVoice(VoiceGender, VoiceAge, Int32)

Instructs the synthesizer to change the voice in the PromptBuilder object and specifies its gender, age, and a preferred voice that matches the specified gender and age.

System_CAPS_pubmethodStartVoice(VoiceInfo)

Instructs the synthesizer to change the voice in the PromptBuilder object and specifies criteria for the new voice.

System_CAPS_pubmethodToString()

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

System_CAPS_pubmethodToXml()

Returns the SSML generated from the PromptBuilder object.

With PromptBuilder, you can add a variety of content types to a prompt, including plain text, SSML markup (as a string or a file), recorded audio, or even another PromptBuilder object.

To append text to a PromptBuilder object and optionally control voice attributes such as emphasis, rate, and volume, use one of the AppendText methods. You can also control voice attributes as a group with the StartStyle and EndStyle methods.

You can append text and control what is spoken or how it is pronounced using the AppendTextWithHint, AppendTextWithAlias, AppendTextWithPronunciation, AppendSsml, or AppendSsmlMarkup methods.

Change the currently selected speaking voice in the prompt using one of the overloaded StartVoice methods, naming a specific voice to use or specifying required voice characteristics, such as age and gender.

To generate speech from a PromptBuilder object, you can pass it as an argument to the Speak method.

For more information, see Constructing a Complex Prompt.

.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
Show:
© 2016 Microsoft