SpeechSynthesizer doesn't get all installed voices

纵饮孤独 提交于 2019-11-27 07:21:17

问题


I have installed a new 32 bits Scansoft voice (Jennifer) in my Windows 7 64 bits OS in order to be able to use from in one .NET application i'm developing.

The problem is that I when I call the method :

   List<string> allInstalledVoices = new SpeechSynthesizer().GetInstalledVoices();

I only get one voice returned, the default Microsoft Anna Voice. but I can see all the installed voices in other text to speech application.


回答1:


I found what the problem was. It turns out that when compiling the project to "Any CPU" (using Visual Studio 2008), the problem occurs. but when changed to x86, the problem doesn't appear anymore.




回答2:


I'm having troubles verifying this, but I believe that Scansoft's Jennifer voice is a SAPI 4.0 compliant voice; the Managed Speech API only works with SAPI 5.1 compliant voices.



来源:https://stackoverflow.com/questions/3208617/speechsynthesizer-doesnt-get-all-installed-voices

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