Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SpeechSynthesizer class

Provides access to the functionality of an installed speech synthesis engine (voice).

Windows includes Microsoft-signed voices that can be used for a variety of languages. Each voice generates synthesized speech in a single language, as spoken in a specific country/region.

Only Microsoft-signed voices installed on the system can be used to generate speech. If no language is specified, the voice that most closely matches the language selected by the user in the Language control panel is loaded.

Syntax


Public NotInheritable Class SpeechSynthesizer
    Implements IDisposable

Members

The SpeechSynthesizer class has these types of members:

Constructors

The SpeechSynthesizer class has these constructors.

ConstructorDescription
SpeechSynthesizer Initializes a new instance of a SpeechSynthesizer object.

 

Methods

The SpeechSynthesizer class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Close [C++, JavaScript]Closes the SpeechSynthesizer and releases system resources.
Dispose [C#, VB]Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
SynthesizeSsmlToStreamAsync Asynchronously generate speech output from a string containing Speech Synthesis Markup Language (SSML).
SynthesizeTextToStreamAsync Asynchronously generate speech output from a string.

 

Properties

The SpeechSynthesizer class has these properties.

PropertyAccess typeDescription

AllVoices

Read-onlyGets a collection of all installed speech synthesis engines (voices).

DefaultVoice

Read-onlyGets the default speech synthesis engine (voice).

Voice

Read/writeGets or sets the speech synthesis engine (voice).

 

Examples

Your Windows Store app can use a SpeechSynthesizer object to create an audio stream and output speech based on a plain text string.

No code example is currently available or this language may not be supported.

Your Windows Store app can also use a SpeechSynthesizer object to create an audio stream and output speech based on a Speech Synthesis Markup Language (SSML) text string.

No code example is currently available or this language may not be supported.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Media.SpeechSynthesis
Windows::Media::SpeechSynthesis [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Media.SpeechSynthesis
Windows::Media::SpeechSynthesis [C++]

Metadata

Windows.winmd

Attributes

[MarshalingBehavior(Agile)]
[Version(0x06030000)]

See also

Reference
Windows.Media.SpeechSynthesis
Object
IClosable
VoiceInformation
Samples
Speech synthesis sample

 

 

Show:
© 2015 Microsoft