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);
}