Delen via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

SpeechSynthesizer.GetInstalledVoices Method (CultureInfo)

Returns all of the installed speech synthesis (text-to-speech) voices that support a specific locale.

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

Syntax

'Declaration
Public Function GetInstalledVoices ( _
    culture As CultureInfo _
) As ReadOnlyCollection(Of InstalledVoice)
'Usage
Dim instance As SpeechSynthesizer
Dim culture As CultureInfo
Dim returnValue As ReadOnlyCollection(Of InstalledVoice)

returnValue = instance.GetInstalledVoices(culture)
public ReadOnlyCollection<InstalledVoice> GetInstalledVoices(
    CultureInfo culture
)

Parameters

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<InstalledVoice>
Returns a read-only collection of the voices currently installed on the system that support the specified locale.

Remarks

A voice is an installed Runtime Language for speech synthesis (TTS, or text-to-speech). The Microsoft Speech Platform Runtime 11 and Microsoft Speech Platform SDK 11 do not include any Runtime Languages for speech synthesis. You must download and install a Runtime Language for each language in which you want to generate synthesized speech. A Runtime Language includes the language model, acoustic model, and other data necessary to provision a speech engine to perform speech synthesis in a particular language. See InstalledVoice for more information.

If none of the installed voices support the specified locale, this method returns an empty collection.

The Microsoft Speech Platform SDK 11 accepts all valid language-country codes as values for culture. For a given language code specified in the culture parameter, a speech synthesis Runtime Language that supports that language code must be installed to correctly pronounce words in the specified language.

If the culture parameter specifies only a language code, (such as "en" for English or "es" for Spanish), and not a country/region code, then any installed speech synthesis voice that expresses support for that generic, region-independent language may produce acceptable pronunciations for words in the specified language. See Language Identifier Constants and Strings for a comprehensive list of language codes.

See Also

Reference

SpeechSynthesizer Class

SpeechSynthesizer Members

GetInstalledVoices Overload

Microsoft.Speech.Synthesis Namespace