我尝试使用 System.Speech.Synthesis 中的 SpeechSynthesizer,因为它似乎比我之前使用的那个 (Windows.Media.SpeechSynthesis) 更全面:我希望能够设置音量、声音的性别、 ...此外,法语发音有一些错误,所以我想检查 System.Speech 是否更好。
我添加了引用,但是构建给出了这个错误,我无法修复它:
Cannot find type System.MarshalByRefObject in module CommonLanguageRuntimeLibrary.
最佳答案
没有真正的方法可以在 WinRT 应用程序中使用 .NET API System.Speech.Synthesis,而无需创建最终会导致 WACK 测试提交失败的应用程序。
许多 .NET 命名空间尚未投影到 WinRT 中。特别是 System.Speech.*,因为已经有 Windows.Media.SpeechSynthesis 和 Windows.Media.SpeechRecognition,它们是从 Windows Phone API 命名空间引入的,并且对于大多数用途来说应该在功能上是完整的。
只有属于 .NETCore profile 的旧 .NET API已转换到 WinRT。
关于c# - 将 System.Speech.Synthesis 与 Windows10 通用应用程序 (XAML-C#) 结合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32376192/