我想将System.Speech.Synthesis用于winform桌面应用程序的可执行程序集。
我想要更改voice age或使用neutral gender,但现在我只能更改性别(女性和男性)。
我已经下载了MSSpeech_SR_en-US_TELE和x64_SpeechPlatformRuntime,因为我的系统是x64,并且都安装了。
我没有安装微软语音平台(SDK) x64_MicrosoftSpeechPlatformSDK,因为它已经安装了。也许我需要用上面的安装再次修复它,或者我需要其他东西,因为没有什么变化:
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);
}发布于 2017-05-17 01:15:20
根据这个类似的问题,如果枚举不存在于年龄或性别,这意味着你将不得不下载它。如何/从哪里下载是另一个问题。
how I can change the voice synthesizer gender and age in C#?
https://stackoverflow.com/questions/44006820
复制相似问题