views:

89

answers:

2

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

but 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  A: 

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.

Eric Brown
A: 

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.

Attilah
Ah. You didn't mention this was 64-bit.
Eric Brown
Eric, sorry about that. have you reproduced this problem ?
Attilah
It's not a _problem_ per se; it's a byproduct of Win64 and .NET. .NET apps (by definition) run as 64 bit apps on a 64-bit OS, and 32 bit apps on a 32-bit OS. However, you can't load a 32-bit DLL into a 64-bit app. All the Microsoft TTS engines ship in both 64-bit and 32-bit versions, but the Scansoft engines apparently only ship in 32-bit versions. Therefore, on a 64-bit application, you can only load the Microsoft TTS engines, and not the Scansoft engines.And, therefore, if you mark your .NET app as 32-bit only, you can load both engines, and you see all your voices.
Eric Brown