良好的语音识别API [英] good Speech recognition API

查看:396
本文介绍了良好的语音识别API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一所大学的项目中,我使用的语音识别。目前,我在Windows 7上开发它,我使用system.speech API包,它与.NET出现了,我这样做是在C#。

I am working on a college project in which I am using speech recognition. Currently I am developing it on Windows 7 and I'm using system.speech API package which comes along with .net and I am doing it on C#.

我现在面临的问题是听写识别不够准确。然后,每当我开始我的应用程序的桌面语音识别会自动启动。这是一个很大的nuicance给我。正如我已经说的话是不够明确,相互矛盾的认识是相互preTED作为指令而类似的应用程序切换尽量减少正在开展的行动。

The problem I am facing is dictation recognition is not accurate enough. Then whenever I start my application the desktop speech recognition starts automatically. This is a big nuicance to me. As already the words I speak are not clear enough and conflicting recognition are interpreted as commands and actions like application switching minimize is being carried out.

这是我的应用程序的一个重要组成部分,我恳请你认为我比这个微软的失误以外的任何良好的语音API。这将是很好的,即使能理解只是简单的听写语法。

This is a critical part of my app and i kindly request you to suggest any good speech API for me other than this Microsoft blunder. It will be good even if it can understand just simple dictation grammar.

推荐答案

我觉得台式机的识别开始,因为你使用的是共享的桌面识别。您应该使用一个进程内识别仅供您的应用程序。你做到这一点,在你的应用实例化一个SpeechRecognitionEngine()。

I think desktop recognition is starting because you are using a shared desktop recognizer. You should use an inproc recognizer for your application only. you do this by instantiating a SpeechRecognitionEngine() in your application.

由于您使用听写语法和桌面窗口识别器,我相信它可以通过扬声器来提高其精度进行培训。通过Windows 7的识别训练,看看精度提高。

Since you are using the dictation grammar and the desktop windows recognizer, I believe it can be trained by the speaker to improve its accuracy. Go through the Windows 7 recognizer training and see if the accuracy improves.

要开始使用.NET的讲话,有被发表在几年前,在<一个非常好的文章href="http://msdn.microsoft.com/en-us/magazine/cc163663.aspx">http://msdn.microsoft.com/en-us/magazine/cc163663.aspx.这可能是最好的介绍性文章中,我发现到目前为止。这是一个有点过时了,但很helfpul。 (该AppendResultKeyValue方法公测后丢弃。)

To get started with .NET speech, there is a very good article that was published a few years ago at http://msdn.microsoft.com/en-us/magazine/cc163663.aspx. It is probably the best introductory article I’ve found so far. It is a little out of date, but very helfpul. (The AppendResultKeyValue method was dropped after the beta.)

下面是一个快速示例,演示了简单的.NET的一个窗口窗体应用程序使用听写语法,我能想到的。这应该工作在Windows Vista或Windows 7。我创建了一个表格。丢弃的按钮就可以了,并提出了按钮大。增加了一个参考System.Speech而行:

Here is a quick sample that shows one of the simplest .NET windows forms app to use a dictation grammar that I could think of. This should work on Windows Vista or Windows 7. I created a form. Dropped a button on it and made the button big. Added a reference to System.Speech and the line:

using System.Speech.Recognition;

然后,我添加了以下事件处理程序按钮1:

Then I added the following event handler to button1:

private void button1_Click(object sender, EventArgs e)
{         
    SpeechRecognitionEngine recognizer = new SpeechRecognitionEngine();
    Grammar dictationGrammar = new DictationGrammar();
    recognizer.LoadGrammar(dictationGrammar);
    try
    {
        button1.Text = "Speak Now";
        recognizer.SetInputToDefaultAudioDevice();
        RecognitionResult result = recognizer.Recognize();
        button1.Text = result.Text;
    }
    catch (InvalidOperationException exception)
    {
        button1.Text = String.Format("Could not recognize input from default aduio device. Is a microphone or sound card available?\r\n{0} - {1}.", exception.Source, exception.Message);
    }
    finally
    {
        recognizer.UnloadAllGrammars();
    }                          
}

比较语音引擎和API运微软的各种口味有点更多信息可以在<一个发现href="http://stackoverflow.com/questions/2977338/what-is-the-difference-between-system-speech-recognition-and-microsoft-speech-rec">What是System.Speech.Recognition和Microsoft.Speech.Recognition之间的区别是什么??

这篇关于良好的语音识别API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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