c# - 将 System.Speech.Synthesis 与 Windows10 通用应用程序 (XAML-C#) 结合使用

标签 c# win-universal-app windows-10 volume speechsynthesizer

我尝试使用 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/

相关文章:

visual-studio-2015 - Visual Studio 2015 RTM 中的设备列表中没有显示电话模拟器

windows-10 - Windows 10 更新后 F12Chooser.exe 不运行

c# - 名称 "Settings"在命名空间 "clr-namespace:MyApp.Properties"中不存在

c# - Json.net 内存使用

c# - 如何以编程方式将音频添加到 Toast 通知?

git - 在 Windows 上的 Git 身份验证中禁用 "Sign into your account"

windows - 如何从批处理文件中的脚本参数中去除引号?

c# - 在字符串列表中选择一个字符串 linq

c# - 在对象初始值设定项中迭代列表

c# - 为什么 XAML 不等同于 AddHandler?