Windows Phone 8.1 Access to speech synthesizer denied?
I am trying to create an application that tells users when they click a button.
The speech synthesizer code looks like this
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();
While this code worked in another application, it doesn't work with this project. I keep getting the following error.
+ 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}
I read online that I had to delete the value of HKEY_CURRENT_USER \ Software \ Microsoft \ Speech \ CurrentUserLexicon from my registry using regedit, but that didn't work.
Can anyone please help?
+3
source to share