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.
Assembly: System.Speech (in System.Speech.dll)
The PromptBuilder type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | PromptBuilder() | Creates a new instance of the PromptBuilder class. |
![]() | PromptBuilder(CultureInfo) | Creates a new instance of the PromptBuilder class and specifies a culture. |
| Name | Description | |
|---|---|---|
![]() | AppendAudio(String) | Appends the specified audio file to the PromptBuilder. |
![]() | AppendAudio(Uri) | Appends the audio file at the specified URI to the PromptBuilder. |
![]() | AppendAudio(Uri, String) | Appends the specified audio file and alternate text to the PromptBuilder. |
![]() | AppendBookmark | Appends a bookmark to the PromptBuilder object. |
![]() | AppendBreak() | Appends a break to the PromptBuilder object. |
![]() | AppendBreak(PromptBreak) | Appends a break to the PromptBuilder object and specifies its strength (duration). |
![]() | AppendBreak(TimeSpan) | Appends a break of the specified duration to the PromptBuilder object. |
![]() | AppendPromptBuilder | Appends a PromptBuilder object to another PromptBuilder object. |
![]() | AppendSsml(String) | Appends the SSML file at the specified path to the PromptBuilder object. |
![]() | AppendSsml(Uri) | Appends the SSML file at the specified URI to the PromptBuilder object. |
![]() | AppendSsml(XmlReader) | Appends the specified XML file containing SSML to the PromptBuilder object. |
![]() | AppendSsmlMarkup | Appends the specified string containing SSML markup to the PromptBuilder object. |
![]() | AppendText(String) | Specifies text to append to the PromptBuilder object. |
![]() | AppendText(String, PromptEmphasis) | Appends text to the PromptBuilder object and specifies the degree of emphasis for the text. |
![]() | AppendText(String, PromptRate) | Appends text to the PromptBuilder object and specifies the speaking rate for the text. |
![]() | AppendText(String, PromptVolume) | Appends text to the PromptBuilder object and specifies the volume to speak the text. |
![]() | AppendTextWithAlias | Appends text to the PromptBuilder object and specifies the alias text to be spoken in place of the appended text. |
![]() | AppendTextWithHint(String, SayAs) | Appends text to the PromptBuilder object and specifies the content type using a member of the SayAs enumeration. |
![]() | AppendTextWithHint(String, String) | Appends text to the PromptBuilder object and a String that specifies the content type of the text. |
![]() | AppendTextWithPronunciation | Appends text to the PromptBuilder object and specifies the pronunciation for the text. |
![]() | ClearContent | Clears the content from the PromptBuilder object. |
![]() | EndParagraph | Specifies the end of a paragraph in the PromptBuilder object. |
![]() | EndSentence | Specifies the end of a sentence in the PromptBuilder object. |
![]() | EndStyle | Specifies the end of a style in the PromptBuilder object. |
![]() | EndVoice | Specifies the end of use of a voice in the PromptBuilder object. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (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.) |
![]() | StartParagraph() | Specifies the start of a paragraph in the PromptBuilder object. |
![]() | StartParagraph(CultureInfo) | Specifies the start of a paragraph in the specified culture in the PromptBuilder object. |
![]() | StartSentence() | Specifies the start of a sentence in the PromptBuilder object. |
![]() | StartSentence(CultureInfo) | Specifies the start of a sentence in the specified culture in the PromptBuilder object. |
![]() | StartStyle | Specifies the start of a style in the PromptBuilder object. |
![]() | StartVoice(CultureInfo) | Instructs the synthesizer to change the voice in the PromptBuilder object and specifies the culture of the voice to use. |
![]() | StartVoice(String) | Instructs the synthesizer to change the voice in the PromptBuilder object and specifies the name of the voice to use. |
![]() | StartVoice(VoiceGender) | Instructs the synthesizer to change the voice in the PromptBuilder object and specifies the gender of the voice to use. |
![]() | StartVoice(VoiceInfo) | Instructs the synthesizer to change the voice in the PromptBuilder object and specifies criteria for the new voice. |
![]() | StartVoice(VoiceGender, VoiceAge) | Instructs the synthesizer to change the voice in the PromptBuilder object and specifies the gender and the age of the new voice. |
![]() | StartVoice(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. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | ToXml | 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(PromptStyle) and EndStyle() methods.
You can append text and control what is spoken or how it is pronounced using the AppendTextWithHint(), AppendTextWithAlias(String, String), AppendTextWithPronunciation(String, String), AppendSsml(), or AppendSsmlMarkup(String) 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(PromptBuilder) method.
For more information, see Constructing a Complex Prompt.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
