我找不到 System.speech
我正在尝试做一个使用 Windows 语音识别库的项目,并且我正在尝试添加对 System.speech 的引用,因为我正在使用:
SpeechSynthesizer synth = new SpeechSynthesizer();
但是,当我尝试时,我在 .NET 选项卡中找不到 System.speech添加参考。我更新了 .NET Framework,但仍然找不到它。有没有一种方法可以简单地添加它?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
检查通常在以下位置找到的参考程序集目录:C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\
应该有 System.Speech dll 的副本
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
单击菜单栏中的“项目”,然后单击“添加引用”。单击出现的窗口中的 .NET 选项卡。搜索并选择 System.Speech。单击“确定”。之后应该可以工作。
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.
检查您的项目类型及其目标框架的版本。
SpeechSynthesizer
存在在 .NET 3.0、3.5 和 4 中 - 但仅在客户端配置文件的 v4 中。如果您的项目有其他目标,那就可以解释为什么您没有看到它。否则,它应该在那里......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...嗯,我几个月前就遇到过这个问题。
这就是修复对我来说的效果:
转到:C:\ProgramFiles\Reference Assembly\Microsoft**
搜索:**System.Speech.dll
从项目|添加引用菜单将其添加为引用。
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.
发生这种情况的原因是:
好吧,这个问题很容易解决:
方法一
如果不能解决此问题,请使用方法 2
方法 2
将以下文件添加到项目中。
转到:项目菜单 >添加参考>浏览> C:\Program Files (x86)\Reference Assemblies\Microsoft.NETFramework\v4.6.1\System.Speech.dll
如果不能解决此问题,请使用方法 3
方法 3
转到:Project Solution Explorer >展开参考文献 >右键单击 System.speech ->选择属性->具体版本->设置为“FALSE”
注意:确保嵌入互操作类型设置为“FALSE”(参考属性)
This happens for the reasons:
Fine, it can be easily solvable:
Method 1
If it doesn't solve this issue use method 2
Method 2
Add the following file to project.
Go to: Projects Menu > Add reference > Browse > C:\Program Files (x86)\Reference Assemblies\Microsoft.NETFramework\v4.6.1\System.Speech.dll
If it doesn't solve this issue use method 3
Method 3
Go to: Project Solution Explorer > Expand References > Right click on System.speech -> Select Properties -> Specific Version -> Set to "FALSE"
NOTE : make sure Embed Interop Types is set to "FALSE" (Reference Properties)
我也遇到了同样的问题,要解决它,请使用
项目
>添加引用
,然后添加以下文件
C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Speech.dll
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