Ari*_*Ari 3 c# text-to-speech windows-phone-8.1
我正在尝试构建一个应用程序,当用户按下按钮时会对用户说话.
语音合成器代码如下
Windows.Media.SpeechSynthesis.SpeechSynthesizer x = new Windows.Media.SpeechSynthesis.SpeechSynthesizer();
var stream = await x.SynthesizeTextToStreamAsync(someString);
var mediaElement = new MediaElement();
mediaElement.SetSource(stream, stream.ContentType);
mediaElement.Play();
Run Code Online (Sandbox Code Playgroud)
虽然此代码在不同的应用程序中工作,但它不适用于此项目.我一直收到以下错误.
+ e {System.UnauthorizedAccessException: Access is denied. Access is denied. at Windows.Media.SpeechSynthesis.SpeechSynthesizer..ctor() at TalkingWalkingMaps.ManeuverDisplayer.<DisplayManeuver>d__0.MoveNext()} System.Exception {System.UnauthorizedAccessException}
Run Code Online (Sandbox Code Playgroud)
我在线阅读我必须使用regedit从我的注册表中删除HKEY_CURRENT_USER\Software\Microsoft\Speech\CurrentUserLexicon值,但这不起作用.
有人可以帮忙吗?