using System.Speech.Synthesis with Windows10 universal app (XAML-C#)

╄→гoц情女王★ 提交于 2019-12-11 03:43:29

问题


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.

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

Cannot find type System.MarshalByRefObject in module CommonLanguageRuntimeLibrary.

回答1:


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.

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.

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



来源:https://stackoverflow.com/questions/32376192/using-system-speech-synthesis-with-windows10-universal-app-xaml-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!