SpeechSynthesizer Class

Definition

Performs speech synthesis to speaker, file, or other audio output streams, and gets synthesized audio as result. Updated in version 1.16.0

public sealed class SpeechSynthesizer : IDisposable
type SpeechSynthesizer = class
    interface IDisposable
Public NotInheritable Class SpeechSynthesizer
Implements IDisposable
Inheritance
SpeechSynthesizer
Implements

Constructors

SpeechSynthesizer(SpeechConfig)

Creates a new instance of SpeechSynthesizer.

SpeechSynthesizer(SpeechConfig, AudioConfig)

Creates a new instance of SpeechSynthesizer.

SpeechSynthesizer(SpeechConfig, AutoDetectSourceLanguageConfig, AudioConfig)

Creates a new instance of SpeechSynthesizer. Added in 1.13.0

Properties

AuthorizationToken

Gets/sets authorization token used to communicate with the service. Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the caller needs to refresh it by calling this setter with a new valid token. Otherwise, the synthesizer will encounter errors while speech synthesis. Added in version 1.7.0

Properties

The collection of properties and their values defined for this SpeechSynthesizer. Note: The property collection is only valid until the SpeechSynthesizer owning this Properties is disposed or finalized.

Methods

Dispose()

Dispose of associated resources.

Finalize()
GetVoicesAsync(String)

Get the available voices. Added in version 1.16.0

SpeakSsmlAsync(String)

Synthesize speech from SSML synchronously (returns when done synthesizing).

SpeakTextAsync(String)

Synthesize speech from plain text synchronously (returns when done synthesizing).

StartSpeakingSsmlAsync(String)

Queue speech synthesis task from SSML as an asynchronous operation.

StartSpeakingTextAsync(String)

Queue speech synthesis task from plain text as an asynchronous operation.

StopSpeakingAsync()

Stop speech synthesis.

Events

BookmarkReached

Signals that a bookmark was reached. Added in version 1.16.0

SynthesisCanceled

Signals that the speech synthesis was canceled.

SynthesisCompleted

Signals that speech synthesis has completed.

SynthesisStarted

Signals that speech synthesis has started.

Synthesizing

Signals that speech synthesis is ongoing. This event fires each time the SDK receives an audio chunk from the Speech service.

VisemeReceived

Signals that a viseme event was received. Added in version 1.16.0

WordBoundary

Signals that a word boundary was received. Added in version 1.7.0

Applies to