简体   繁体   English

System.Speech无法识别

[英]System.Speech not recognized

I am using C# 2010 Express, and I want to do speech recognition. 我正在使用C#2010 Express,我想做语音识别。 However, when I type the following at the beginning of my file: 但是,当我在文件的开头键入以下内容时:

using System.Speech;

System.Speech is not recognized. System.Speech无法识别。 Just to be sure, I installed the Speech SDK from Microsoft, but saw no difference. 可以肯定的是,我安装了Microsoft的Speech SDK,但没有看到任何区别。

I am using the .NET 4.0 Client Profile framework, which should work fine, I think. 我正在使用.NET 4.0 Client Profile框架,我认为它应该可以正常工作。

What should I do to resolve this? 我该怎么做才能解决这个问题? Is it a limitation of C# Express? 这是C#Express的限制吗?

You must add a reference to it. 您必须添加对它的引用。 Go to the solution explorer: 转到解决方案资源管理器:

在此输入图像描述

Then right-click the references item and choose add reference. 然后右键单击引用项并选择“添加引用”。 Make sure you are on the tab .Net in the window that pops up. 确保您在弹出的窗口中的.Net选项卡上。 Scroll down until you see System.Speech. 向下滚动,直到看到System.Speech。

在此输入图像描述

Select it and click OK. 选择它并单击“确定”。 Now it will recognize speech. 现在它将承认演讲。

它支持.NET 4.0及更高版本。您需要在Add Reference .NET选项卡中明确包含该命名空间

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM