Export (0) Print
Expand All

SpeechSynthesizer class

Applies to Windows and Windows Phone

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

Attributes

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

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

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

See also

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

 

 

Show:
© 2014 Microsoft