Sunday, November 24, 2013

How we can get the installed voices using c#?

This sample code will get the installed voices using C# SpeechSynthesizer and will load in to a combo box.

using (SpeechSynthesizer synth = new SpeechSynthesizer())
{
    foreach (InstalledVoice voice in synth.GetInstalledVoices())
    {
        VoiceInfo info = voice.VoiceInfo;
        cmbVoices.Items.Add(info.Description + ", " + info.Gender + ", " + info.Age);
        installedVoices.Add(info);
    }
    if (cmbVoices.Items.Count > 0)
    {
        cmbVoices.SelectedIndex = 0;
    }
}

No comments:

landscape paintings nature art landscape art sky art illustration art artwork art human art beautiful art landscape prints nature prints sky prints illustration prints artwork prints human prints beautiful prints beautiful special promotions nature special promotions sky special promotions illustration special promotions artwork special promotions beautiful canvas prints beautiful painting canvas prints beautiful framed prints beautiful painting framed prints beautiful posters beautiful painting posters