SpeechSynthesizer.SpeakAsync Method

 

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

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

NameDescription
System_CAPS_pubmethodSpeakAsync(Prompt)

Asynchronously speaks the contents of a Prompt object.

System_CAPS_pubmethodSpeakAsync(PromptBuilder)

Asynchronously speaks the contents of a PromptBuilder object.

System_CAPS_pubmethodSpeakAsync(String)

Asynchronously speaks the contents of a string.

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 method to generate speech synchronously.

Return to top
Show: