Export (0) Print
Expand All

PromptBuilder.Culture Property

Gets or sets the culture information for the PromptBuilder object.

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

public CultureInfo Culture { get; set; }

The SpeechSynthesizer object will attempt to select an installed voice 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, StartParagraph, and StartSentence 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.

To correctly pronounce words in the language specified by the Culture property, a speech synthesis (text-to-speech or TTS) engine that supports the language must be installed. An installed TTS engine is called a voice. To get information about which voices are installed for a specific culture, use the GetInstalledVoices method.

Microsoft Windows and the System.Speech API accept all valid language-country codes as values for culture. The TTS engines that shipped with Windows 7 support the following language-country codes:

  • en-US. English (United States)

  • zh-CN. Chinese (China)

  • zh-TW. Chinese (Taiwan)

Two-letter language codes such as "en" are also permitted. See Language Identifier Constants and Strings for a comprehensive list of language codes.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft