SpeechSynthesizer.SpeakAsync Method

Generates speech output asynchronously from a string, a Prompt object, or a PromptBuilder object.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method SpeakAsync(Prompt) Asynchronously speaks the contents of a Prompt object.
Public method SpeakAsync(PromptBuilder) Asynchronously speaks the contents of a PromptBuilder object.
Public method SpeakAsync(String) Asynchronously speaks the contents of a string.
Top

The SpeakAsync() methods generate speech asynchronously. The methods return immediately without waiting for the content of the SpeakAsync() object to finish speaking. Use SpeakAsync() if your application needs to perform tasks while speaking, for example highlight text, paint animation, monitor controls, or other tasks.

During a call to this method, the SpeechSynthesizer can raise the following events:

  • StateChanged. Raised when the speaking state of the synthesizer changes.

  • SpeakStarted. Raised when the synthesizer begins generating speech.

  • PhonemeReached. Raised each time the synthesizer reaches a letter or combination of letters that constitute a discreet sound of speech in a language.

  • SpeakProgress. Raised each time the synthesizer completes speaking a word.

  • VisemeReached. Raised each time spoken output requires a change in the position of the mouth or the facial muscles used to produce speech.

  • BookmarkReached. Raised when the synthesizer encounters a bookmark in a prompt.

  • VoiceChange. Raised when the speaking voice for the synthesizer changes.

  • SpeakCompleted. Raised when the synthesizer finishes a SpeakAsync() operation.

If your application does not need to perform tasks while speaking, you can use the Speak() methods or the SpeakSsml(String) method to generate speech synchronously.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft