Windows 语音识别 C#
我正在制作一个可以执行某些操作的程序(抱歉,我不能透露它是什么),但我希望能够让 Windows Speech 以某种方式“知道”我的表单上有链接标签和按钮,这样当我说“下一步”或“开始”等时,它会单击这些按钮。就像当您使用 IE 并且访问 Google.com 时,当您说“搜索”时,它将执行单击搜索按钮并开始搜索的操作。
问题是它似乎不知道 C# Windows 窗体应用程序中存在按钮/链接标签或类似内容。这是我们必须自己做的事情吗?
谢谢贝尔
I'm making a program that does stuff (Sorry, I'm not allowed to say what it is), but I want to be able to let Windows Speech somehow "know" that there are linklabels and buttons on my Forms, so that when I say "Next" or "Start" etc, it will click those buttons. Just like when you are using IE and you are on Google.com and when you say "Search" it will perform a click on the search button and begin the search.
The problem is that it doesn't seem to know that buttons/linklabels or anything like that exist in C# windows forms applications. Is this something that we must do ourselves?
Thanks
Bael
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Windows 语音识别使用 MSAA 和 UI 自动化来查找应用程序上的按钮、链接等。因此,如果您的应用程序在控件上设置了适当的 AccessibleRole 和 AccessibleName 定义,WSR 应该可以正常找到它们。
Windows Speech Recognition uses MSAA and UI Automation to find the buttons, links, etc., on your application. So, if your app has the appropriate AccessibleRole and AccessibleName definitions set on your controls, WSR should find them just fine.
有一种方法可以让您的语音记录识别标签。程序,但我不确定按钮。
There is a way to make labels known to your speech rec. program but i'm not sure about buttons.
你可以使用一个开关:
You could use a switch: