Note

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

PromptBuilder.Culture Property

Gets or sets the culture information for the PromptBuilder object.

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

Syntax

'Declaration
Public Property Culture As CultureInfo
    Get
    Set
'Usage
Dim instance As PromptBuilder
Dim value As CultureInfo

value = instance.Culture

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

Property Value

Type: System.Globalization.CultureInfo

Remarks

The SpeechSynthesizer object will attempt to select an installed voice (a Runtime Language for speech synthesis) that supports the language specified by the Culture property to process the prompt. If a voice with the specified culture is found, it will be used. If a voice with the specified culture cannot be found, the default voice will be used.

A culture may also be specified within the prompt for discreet sections of content using the StartVoice(CultureInfo), StartParagraph(CultureInfo), and StartSentence(CultureInfo) methods. A culture specified for a portion of content using one of the above methods will override the Culture property while in effect, and the SpeechSynthesizer will attempt to select an installed voice that supports the language specified by the culture parameter of the method.

The Microsoft Speech Platform SDK 11 accepts all valid language-country codes as values for Culture.To correctly pronounce words in the language specified by the Culture property, a Runtime Language must be installed that supports the specified language. An installed Runtime Language is called a voice. To get information about which voices are installed for a specific culture, use the GetInstalledVoices(CultureInfo) method.

If the Culture property 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.

The Microsoft Speech Platform Runtime 11 and Microsoft Speech Platform SDK 11 do not include any languages for speech synthesis. You must download a Runtime Language for each language in which you want to generate synthesized speech.

The Runtime Languages are different for each version of the Speech Platform Runtime. You must download the Runtime Language version that matches the version of the Speech Platform Runtime that you have installed. The Runtime Languages for the Speech Platform SDK 11 are redistributable and are different than the languages that ship with Windows Vista or Windows 7. Use the following link to download Runtime Languages for version 11 of the Speech Platform Runtime:

See Language Support for a list of languages for which you can download Runtime Languages.

See Also

Reference

PromptBuilder Class

PromptBuilder Members

Microsoft.Speech.Synthesis Namespace