在Windows10通用应用程序(XAML-C#)中使用System.Speech.Synthesis [英] using System.Speech.Synthesis with Windows10 universal app (XAML-C#)

查看:731
本文介绍了在Windows10通用应用程序(XAML-C#)中使用System.Speech.Synthesis的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用System.Speech.Synthesis中的SpeechSynthesizer,因为它似乎比以前使用的语言(Windows.Media.SpeechSynthesis)更全面:我希望能够设置音量,声音的性别, ...此外,法语的发音有一些错误,所以我想检查一下System.Speech是否更好.

I tried to use the SpeechSynthesizer from System.Speech.Synthesis because it seems more comprehensive than the one I used before (Windows.Media.SpeechSynthesis) : I want to be able to set the volume, the gender of the voice, ... Besides, the french prononciation has some bugs, so I wanted to check if System.Speech was better.

我添加了参考,但是Build出现此错误,我无法修复它:

I added the reference, but the Build gives this error and I can't fix it :

Cannot find type System.MarshalByRefObject in module CommonLanguageRuntimeLibrary.

推荐答案

在WinRT应用程序中,实际上没有一种方法可以使用.NET API System.Speech.Synthesis,而无需创建会失败的应用程序. WACK测试提交.

There isn't really a way to use the .NET API System.Speech.Synthesis in a WinRT app, without creating an app that will wind up failing the WACK tests for submission.

许多.NET命名空间尚未投影到WinRT中.特别是System.Speech.*,因为已经有Windows.Media.SpeechSynthesis和Windows.Media.SpeechRecognition,它们是从Windows Phone API命名空间继承而来的,并且在功能上应完成大多数用途.

Many of the .NET namespaces haven't been projected into WinRT. In particular, System.Speech.* since there's already Windows.Media.SpeechSynthesis and Windows.Media.SpeechRecognition, which were brought over from the windows phone API namespaces instead, and should be functionally complete for the majority of purposes.

仅是 .NETCore一部分的旧.NET API.配置文件已投射到WinRT.

Only old .NET APIs that are part of the .NETCore profile have been projected to WinRT.

这篇关于在Windows10通用应用程序(XAML-C#)中使用System.Speech.Synthesis的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆