InstalledVoice Class

InstalledVoice Class


Contains information about a speech synthesis voice installed in Windows.

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


public class InstalledVoice


Gets or sets whether a voice can be used to generate speech.


Gets information about a voice, such as culture, name, gender, and age.


Determines if a given object is an instance of InstalledVoice and equal to the current instance of InstalledVoice.(Overrides Object.Equals(Object).)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Provides a hash code for an InstalledVoice object.(Overrides Object.GetHashCode().)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

Use this class to get information about an installed voice, including its culture, name, gender, age, and whether it is enabled.

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 (engines for speech synthesis) and demonstrates the information that is available for each voice.

using System;
using System.Speech.Synthesis;
using System.Speech.AudioFormat;

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

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

        // Output information about all of the installed voices. 
        Console.WriteLine("Installed voices -");
        foreach (InstalledVoice voice in synth.GetInstalledVoices())
          VoiceInfo info = voice.VoiceInfo;
          string AudioFormats = "";
          foreach (SpeechAudioFormatInfo fmt in info.SupportedAudioFormats)
            AudioFormats += String.Format("{0}\n",

          Console.WriteLine(" Name:          " + info.Name);
          Console.WriteLine(" Culture:       " + info.Culture);
          Console.WriteLine(" Age:           " + info.Age);
          Console.WriteLine(" Gender:        " + info.Gender);
          Console.WriteLine(" Description:   " + info.Description);
          Console.WriteLine(" ID:            " + info.Id);
          Console.WriteLine(" Enabled:       " + voice.Enabled);
          if (info.SupportedAudioFormats.Count != 0)
            Console.WriteLine( " Audio formats: " + AudioFormats);
            Console.WriteLine(" No supported audio formats found");

          string AdditionalInfo = "";
          foreach (string key in info.AdditionalInfo.Keys)
            AdditionalInfo += String.Format("  {0}: {1}\n", key, info.AdditionalInfo[key]);

          Console.WriteLine(" Additional Info - " + AdditionalInfo);
      Console.WriteLine("Press any key to exit...");

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2015 Microsoft