vb.net中的语音识别没有那个烦人的识别窗口(以及关于识别XML) [英] Speech recognition in vb.net without that annoying recognition window (and about the recognition XML)

查看:78
本文介绍了vb.net中的语音识别没有那个烦人的识别窗口(以及关于识别XML)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1.如何在没有恼人的识别窗口的情况下启用语音识别,而无需在该窗口上按下该按钮?



2.我需要知道如何仅识别我创建的XML中的单词(以提高准确性)。喜欢:如果我说红色并且不在XML中,则识别器会将其读作面包或XML中的某些内容。



PS:抱歉我的英语。

1.How to enable speech recognition without that annoying recognition window, and without having to press that button on that window?

2.I need to know how to recognize only the words in the XML that I created (to increase accuracy). Like: If I say "red" and that's not in the XML the recognizer will read it like "bread" or something in the XML.

P.S: Sorry for my english.

推荐答案

首先,有些人或某人欺骗了你恼人的识别窗口。语音识别根本不需要任何窗口。您可能使用了一些愚蠢的应用程序,而不是识别引擎本身。



问题的第二部分非常正确。你真的需要提供一些不同的单词或短语,以获得可接受的识别准确性。这组短语称为语法,通常使用类 System.Speech.Recognition.GrammarBuilder 创建。请参阅:

http://msdn.microsoft.com /en-us/library/system.speech.recognition.grammar [ ^ ],

http://msdn.microsoft.com/en-us/library/system.speech.recognition.grammarbuilder [ ^ ]。



你建立一个语法使用语法构建器基于类的实例选择

http://msdn.microsoft.com/en-us/library/system.speech.recognition.choices.aspx [ ^ ]。



它的目的是提供一组选择作为当前时刻使用的语法实例的约束。请参阅上面引用的文章中的代码示例。



基本上,如果您引用Speech.dll,则可以找到使用语音识别引擎所需的全部内容。 (此库与.NET Framework捆绑在一起并放入GAC中,因此您可以使用Visual Studio中添加引用窗口的.NET选项卡添加引用。)请参阅命名空间 System。 Speech.Recognition

http ://msdn.microsoft.com/en-us/library/system.speech.recognition.aspx [ ^ ]。



此API的中心点是班级 System.Speech.Recognition.SpeechRecognizer System.Speech.Recognition.SpeechRecognitionEngine 。您可以根据您的要求和申请类型选择其中一种。



请参阅:

http://msdn.microsoft.com/en-us/library/system.speech.recognition.speechrecognizer.aspx [ ^ ],

http://msdn.microsoft .com / zh-cn / library / system.speech.recognition.speechrecognitionengine.aspx [ ^ ]。



每个类都有代码示例。 (不需要窗口形式:-)。)



-SA
First, something or somebody fooled you about the "annoying recognition window". Speech recognition does not require any windows at all. You probably worked with some stupid application, not with recognition engine itself.

The second part of the question is quite correct. You really need to supply some distinct words or phrases, to have acceptable recognition accuracy. This set of phrases is called grammar, usually created using the class System.Speech.Recognition.GrammarBuilder. Please see:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.grammar[^],
http://msdn.microsoft.com/en-us/library/system.speech.recognition.grammarbuilder[^].

You build a grammar using the grammar builder based on the instance of the class Choices:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.choices.aspx[^].

The purpose of it is to provide one set of choices as a constraint to an instance of the grammar used at the current moment of time. See the code sample in the article referenced above.

Basically, all you need to use the speech recognition engine can be found if you reference "Speech.dll". (This library is bundled with .NET Framework and put in GAC, so you add the reference using the tab ".NET" of the "Add Reference" window in Visual Studio.) Please see the namespace System.Speech.Recognition:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.aspx[^].

The central point of this API is the class System.Speech.Recognition.SpeechRecognizer or System.Speech.Recognition.SpeechRecognitionEngine. You can choose one of them based on your requirement and application type.

Please see:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.speechrecognizer.aspx[^],
http://msdn.microsoft.com/en-us/library/system.speech.recognition.speechrecognitionengine.aspx[^].

The code sample are available on each of these classes. (No window of form is required :-).)

—SA


这篇关于vb.net中的语音识别没有那个烦人的识别窗口(以及关于识别XML)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆