SpeechSynthesizer.GetInstalledVoices Method (CultureInfo)


Returns all of the installed speech synthesis (text-to-speech) voices that support a specific locale.

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

public ReadOnlyCollection<InstalledVoice> GetInstalledVoices(
	CultureInfo culture


Type: System.Globalization.CultureInfo

The locale that the voice must support.

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<InstalledVoice>

Returns a read-only collection of the voices currently installed on the system that support the specified locale.

If none of the installed voices support the specified locale, this method returns an empty collection.

Microsoft Windows and the System.Speech API accept all valid language-country codes. To perform text-to-speech using the language specified in the Culture property, a speech synthesis engine that supports that language-country code must be installed. The speech synthesis engines that shipped with Microsoft Windows 7 work with 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.

The following example is part of a console application that initializes a SpeechSynthesizer object and outputs to the console a list of the installed voices that support the en-US locale.

using System;
using System.Globalization;
using System.Speech.Synthesis;

namespace SampleSynthesis
  class Program
    static void Main(string[] args)

      // Initialize a new instance of the speech synthesizer.
      using (SpeechSynthesizer synthesizer = new SpeechSynthesizer())

        // Output information about all of the installed voices that
        // support the en-US locacale. 
        Console.WriteLine("Installed voices for the en-US locale:");
        foreach (InstalledVoice voice in
          synthesizer.GetInstalledVoices(new CultureInfo("en-US")))
          VoiceInfo info = voice.VoiceInfo;

        // Output information about the current voice.
        Console.WriteLine("Current voice:");

      Console.WriteLine("Press any key to exit...");

    // Display information about a synthesizer voice.
    private static void OutputVoiceInfo(VoiceInfo info)
      Console.WriteLine("  Name: {0}, culture: {1}, gender: {2}, age: {3}.",
        info.Name, info.Culture, info.Gender, info.Age);
      Console.WriteLine("    Description: {0}", info.Description);

.NET Framework
Available since 3.0
Return to top