在我的 Windows 10 语言中,我安装了 2 个英语版本:
因此,在【设置】>【时间和语言】>【语音】中
在[文本转语音]部分下,我可以看到以下选项:
- 微软大卫移动
- 微软乔治移动
- 微软苏珊移动
- 微软榛子移动
- 微软 Zira 移动
- 微软马克移动
但是,在 C# WinForm 中,通过使用以下代码:
using System.Speech.Synthesis;
SpeechSynthesizer ss = new SpeechSynthesizer();
ss.GetInstalledVoices();
我只能得到:
我想念苏珊、乔治和马克。
如何在 C# WinForm 中获得 Susan、George 和 Mark 的语音版本?
您只能从属于 WinRT Framework 的 Windows.Media.SpeechSynthesis 命名空间访问 Windows 10 语音。所以你不能在 WPF 或 WinForms 中使用它们。
see: “Windows.Media.SpeechSynthesis”和“System.Speech.Synthesis”有什么不同? https://stackoverflow.com/questions/25710852/what-are-the-different-between-windows-media-speechsynthesis-and-system-speec/26355164#26355164
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)