PromptBuilder.StartParagraph Method (CultureInfo)


Specifies the start of a paragraph in the specified culture in the PromptBuilder object.

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

public void StartParagraph(
	CultureInfo culture


Type: System.Globalization.CultureInfo

Provides 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.

Long prompts can be rendered more like human speech if they are broken into sentences and paragraphs.

The culture parameter for a paragraph can be different than the Culture property of the PromptBuilder object that contains it. While in effect, the value of the culture parameter will override the Culture property. The SpeechSynthesizer will attempt to select an installed voice that supports the language specified by the culture parameter to speak the paragraph. 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. To stop using the voice specified by StartParagraph, call EndParagraph.

To correctly pronounce words in the language specified by the culture parameter, 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.

.NET Framework
Available since 3.0
Return to top