Share via


Note

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

VoiceInfo.Culture Property

Gets the culture of the voice.

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

Syntax

'Declaration
Public ReadOnly Property Culture As CultureInfo
    Get
'Usage
Dim instance As VoiceInfo
Dim value As CultureInfo

value = instance.Culture
public CultureInfo Culture { get; }

Property Value

Type: System.Globalization.CultureInfo
Returns information about a specific culture, such as the language, the name of the culture, the writing system, the calendar used, and how to format dates and sort strings.

Remarks

The Culture property identifies the single language that a voice supports. Typically, you will select a voice whose Culture property matches the culture parameter that is specified in the content to speak. You can specify a culture parameter for content to be spoken using the PromptBuilder(CultureInfo) constructor or the StartParagraph(CultureInfo) or StartSentence(CultureInfo) method. If authoring in Speech Synthesis Markup Language (SSML), you specify the culture using the xml:lang attribute.

You can change the voice (and thereby the culture) that the SpeechSynthesizer uses with the PromptBuilder's StartVoice(CultureInfo) method or with the SpeechSynthesizer's SelectVoice(String) or SelectVoiceByHints(VoiceGender, VoiceAge, Int32, CultureInfo) methods.

The Microsoft Speech Platform SDK 11 accepts all valid language-country codes as values for culture. See Language Identifier Constants and Strings for a comprehensive list of language codes.

See InstalledVoice for more information.

See Also

Reference

VoiceInfo Class

VoiceInfo Members

Microsoft.Speech.Synthesis Namespace

InstalledVoice

GetInstalledVoices()