Κοινή χρήση μέσω


PromptBuilder.Culture Property

Definition

Gets or sets the culture information for the PromptBuilder object.

public:
 property System::Globalization::CultureInfo ^ Culture { System::Globalization::CultureInfo ^ get(); void set(System::Globalization::CultureInfo ^ value); };
public System.Globalization.CultureInfo Culture { get; set; }
member this.Culture : System.Globalization.CultureInfo with get, set
Public Property Culture As CultureInfo

Property Value

Remarks

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. For a comprehensive list of language codes, see Language Identifier Constants and Strings.

Applies to