SpeechSynthesizer allows peaking different voices by using
SelectVoiceByHints(VoiceGender, VoiceAge)
function (as I understood). But no customization happens if I change the gender and voice age.
Can you explain why? And if I'm doing something wrong, what is correct way to do that?
Thank you.
Here's a small test program that you can use to discover installed voices:
using System;
using System.Speech.Synthesis; // Add reference to System.Speech
class Program {
static void Main(string[] args) {
var synth = new SpeechSynthesizer();
foreach (var voice in synth.GetInstalledVoices()) {
Console.WriteLine(voice.VoiceInfo.Description);
}
Console.ReadLine();
}
}
Output on my machine: Microsoft Anna - English (United States)
Which is the one and only default voice that's shipped with Windows afaik. Which would of course explain why changing gender and age doesn't have an effect on your machine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With