I can't find System.speech

2019-02-19 04:28发布

I am trying to do a project that uses the windows speech recognition libraries and I am trying to add a reference to System.speech since I am using:

SpeechSynthesizer synth = new SpeechSynthesizer();

However, I can't find System.speech in the .NET tab when I try to add a reference. I updated my .NET Framework and still can't find it. Is there a way to simply add it?

5条回答
家丑人穷心不美
2楼-- · 2019-02-19 04:39

Check the reference assemblies directory typically found in : C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\

That should have a copy of System.Speech dll

查看更多
霸刀☆藐视天下
3楼-- · 2019-02-19 04:39

I also had the same issue, to solve it use projects>add reference,
then add the following file C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Speech.dll

查看更多
放荡不羁爱自由
4楼-- · 2019-02-19 04:41

Check your project type, and the version of the framework it's targeting.

SpeechSynthesizer exists in .NET 3.0, 3.5 and 4 - but only in v4 of the client profile. If your project targets anything else, that would explain why you're not seeing it. Otherwise, it should be there though...

查看更多
萌系小妹纸
5楼-- · 2019-02-19 04:47

Click on Project in the menu bar then click on Add Reference. Click on the .NET tab in the window that appears. Search and select System.Speech. Click OK. It should work after that.

查看更多
仙女界的扛把子
6楼-- · 2019-02-19 04:53

Well, I've experienced this problem many months ago. That's how the fix worked out for me: Go to: C:\ProgramFiles\Reference Assembly\Microsoft** Search for: **System.Speech.dll Add it as a Reference from Project|Add Reference menu.

查看更多
登录 后发表回答