SpeechLib assembly is missing in zip download


Download the zip file with the code; open the solution in VS 08; SpeechLib is missing.

We run into this in our WinForms project at work when some devs are on Vista and some are on XP.

Here's what's wrong: SpeechLib is a built-in COM component. You added it in Vista (version 5.3). I'm using it in WinXP (Version 5.0).

There is no good way to get around this that we've found. If MSBuild could report the OS version number without a custom target you can conditionally load each one depending on OS.

To fix (if you're on XP): delete SpeechLib reference. Click Add Reference... Select COM tab. Scroll down to Microsoft Speech Object Library.

file attachments

Closed Jun 12, 2008 at 5:44 AM by
Moved the system over to System.Speech so this shouldn't be an issue anymore.


clingermangw wrote Jun 2, 2008 at 10:26 PM

Yep, same issue and thanks for the quick solution. Now to peek through more of the code...

shanselman wrote Jun 3, 2008 at 3:18 AM

Yikes, that's obscure. I'd have to write a custom MSBuild task. How about you upload the other lib and I make to csprojs?

The better solution, of course, is to just use my own voice and remove the TTS reference.

jasekemp wrote Jun 3, 2008 at 2:14 PM

There's a managed way to use speech too. I made a quick app to make the computer swear at me. It was hilarious. I could take a look at adding that. I've seen some posts on using Speech in WPF too.

I'll upload my win xp csproj when I'm back at home. I use Vista at work.

brodenbaugh wrote Jun 3, 2008 at 11:07 PM

I don't seem to have speech on my current install of vista, which causes the app to crash when I run it and also obviously does not allow me to build it.

jasekemp wrote Jun 4, 2008 at 12:08 AM

Here's my csproj file from Windows XP as promised.

shanselman wrote Jun 11, 2008 at 7:43 PM

I've removed the COM object and I'm going to use the .NET System.Speech stuff instead. Then, one day, sigh, I'll record my own voice.