Problem with referencing namespaces C#

I want to use Speech Recognition in my Unity 4.6 game. I found that in C# you can use the Windows default speech recognition engine by referencing System.Speech. I tested this in a separate project and it worked easily. However, now I want to do the same in Unity but there is a problem.

54269-ss1.png

I use this method to reference the System.Speech namespace. In Monodevelop, this appears to work fine. But then in Unity Editor, it doesn’t agree and gives me a set of errors.

54270-ss1.png

Unity Editor doesn’t know the namespace System.Speech for some reason. And there is my problem. I tried referencing the namespace in all other assemblies, but it didn’t fix it.

What am I doing wrong?

System.Speech was introduced in .NET 4. Unity’s stuck on the old .NET 2.

You can still use the speech things - write some wrappers for them in a “normal” C# project, and then compile that to a .dll that you use in your Unity project.

Be aware that System.Speech might not work out of the box on every platform even if you do that. It should work on Windows, but I’m guessing that you’ll be out of luck on a Playstation or Iphone.