1

I want to use System.Speech.Synthesis for a winform desktop app executable assembly.

I want to change the voice age or use a neutral gender, but right now I can change only the gender (female and male).

I've downloaded MSSpeech_SR_en-US_TELE and x64_SpeechPlatformRuntime as my system is x64 and I've installed both.

I did not install Microsoft Speech Platform (SDK) x64_MicrosoftSpeechPlatformSDK because it is already installed. Maybe I need to repair it with above installs again or I need something else, because nothing changes:

using (SpeechSynthesizer synthesizer = new SpeechSynthesizer())
{
    foreach (var v in synthesizer.GetInstalledVoices().Select(v => v.VoiceInfo))
    {
        Console.WriteLine("Name:{0}, Gender:{1}, Age:{2}", v.Description, v.Gender, v.Age);
    }

    synthesizer.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Child);

    synthesizer.SetOutputToDefaultAudioDevice();

    PromptBuilder builder = new PromptBuilder();
    builder.AppendText("Found this on Stack Overflow.");
    synthesizer.Speak(builder);
}
Maria Ines Parnisari
  • 16,584
  • 9
  • 85
  • 130

1 Answers1

1

According to this similar question if the enum doesn't exist for the age or gender it means you will have to download it. How/where you download it from is another question..

how I can change the voice synthesizer gender and age in C#?

Community
  • 1
  • 1
tmutton
  • 1,091
  • 7
  • 19
  • 42
  • hello, I've updated my question by following the instructions for your link –  May 17 '17 at 00:25