Iris Classon
Iris Classon - In Love with Code

Error: Access denied when running SpeechSynthesizer()SynthesizeTextToStreamAsync(text)

Today I encountered a problem I haven’t seen since the Windows 8 RTM, on a fresh install of Windows 8.1 and VS 2013 with update 3. I was doing some work with Optical Character Recognition, actually a blog post for tomorrow. However, whenever I was trying to use

await new SpeechSynthesizer().SynthesizeTextToStreamAsync(text);

I kept getting an access denied exception. I know what you are thinking, ‘Did you set capabilities, microphone?’ Yup, even with Microphone capabilities ticked in the app manifest file (even with all capabilities ticket, restarted VS, OS, clean, build etc.). This was a known bug in Windows 8 RTM, and an update fixed that at some point. However, I’m not missing any updates. The second fix, recommended by MS in the forum is to remove a key from the key registry. The key will be generated again, but I’m telling you right now that you are on your own if you fiddle in the key reg. In other words, make a backup, and be certain you want to try this before you do it.

This is the key I removed (I actually first renamed it in case it wasn’t generated again, you could do the same- in case shit you know :) )

HKEY_CURRENT_USER\Software\Microsoft\Speech\CurrentUserLexicon

To open the key registry, Windows + R, type cmd + Enter, type regedit + Enter

Comments

Leave a comment below, or by email.


Last modified on 2014-11-11

comments powered by Disqus