在我的Windows 10语言中,我安装了两个版本的英语:
因此,“设置”>“时间与语言”>“言语”
在“文本到演讲”一节中,我可以看到以下选项:
但是,在C# WinForm中,使用以下代码:
using System.Speech.Synthesis;
SpeechSynthesizer ss = new SpeechSynthesizer();
ss.GetInstalledVoices();我只能得到:
我想念苏珊,乔治和马克。
我怎样才能在C# WinForm中获得苏珊、乔治和马克的语音版本?
发布于 2017-05-17 12:29:06
您只能从属于Windows.Media.SpeechSynthesis框架的WinRT名称空间访问Windows 10声音。所以您不能在WPF或WinForms中使用它们。
请参阅:What are the different between "Windows.Media.SpeechSynthesis" and "System.Speech.Synthesis"?
https://stackoverflow.com/questions/42151093
复制相似问题