语音识别准确度C# [英] Speech recoginiton accuracy C#

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

问题描述





我正在尝试识别用户使用麦克风讲话的内容,并将其与预定义文本进行比较并验证。我使用过System.Speech dll。

我对此有疑问。



1.目前我正在使用语法生成器它中的编码值并将其与用户所说的相匹配。我的代码如下。

以下代码的问题是,有时它会匹配听起来相似的单词

例如听到和年。如果我有话说开发者,如果用户说开发,那么它将从语法中选择开发者。那么有没有办法避免它或提高它的准确性?



2.有没有办法记录用户说的所有内容然后进行比较?如果是,那怎么样?



我尝试过:



  static   void  Main(字符串 [] args)
{
SpeechRecognizer识别器= SpeechRecognizer();

选择颜色= 选择();
colors.Add( new string [] { red green blue});

GrammarBuilder gb = new GrammarBuilder();
gb.Append(colors);

语法g = new 语法(gb);
gb.Culture = Thread.CurrentThread.CurrentCulture;
recognizer.LoadGrammar(g);

recognizer.SpeechRecognized + =
new EventHandler< SpeechRecognizedEventArgs>(sre_SpeechRecognized);
}
void sre_SpeechRecognized( object sender,SpeechRecognizedEventArgs e)
{
if (e.Result.Text == red
{
Console.WriteLine( 识别为红色色);
}
}

解决方案

它与您的代码无关。这种质量(保真度)问题是您正在使用的引擎的一个引人注目的谬误。如果你非常清楚地发音并且你的语法非常小,它确实有效。稍微增加你的语法大小,介绍几个听起来甚至相似的单词,并且......忘记它。荒谬的是,API包括听写语法,它显然涵盖了语言词库的大部分内容。无论用户的发音有多好,这个选项都是无用的。



值得注意的是,在Android上你可以安装语音识别作为另一个键盘。您几乎可以在多种语言的听写模式下使用语音输入,保真度可以与屏幕上的虚拟键盘竞争。



-SA

Hi,

I'm trying to recognize what user is speaking using microphone and compare it with the predefined text and validate. I have used the System.Speech dll.
I have doubts regarding the same.

1.Currently I am using grammar builder with hard-coded values in it and matching it with what user is saying.My Code below.
Problem with below code is that sometimes it matches words which sound similar
for example "hear" and "year". Also if I have word say "developer" and if user says "development" then it will pick "developer" from grammar. So is there way to avoid it or increase the accuracy of it?

2. Is there a way where I can record everything what user has said and then compare it? If yes, then how?

What I have tried:

static void Main(string[] args)
      {
          SpeechRecognizer recognizer = new SpeechRecognizer();

          Choices colors = new Choices();
          colors.Add(new string[] { "red", "green", "blue" });

          GrammarBuilder gb = new GrammarBuilder();
          gb.Append(colors);

          Grammar g = new Grammar(gb);
          gb.Culture = Thread.CurrentThread.CurrentCulture;
          recognizer.LoadGrammar(g);

          recognizer.SpeechRecognized +=
            new EventHandler<SpeechRecognizedEventArgs>(sre_SpeechRecognized);
      }
      void sre_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
      {
          if (e.Result.Text == "red")
          {
              Console.WriteLine("Recognized red color");
          }
      }

解决方案

It has nothing to do with your code. This quality (fidelity) problem is a spectacular fallacy of the engine you are using. It does work if you pronounce everything very clearly and if your grammar is very small. Grow your grammar size a bit, introduce a couple of words which sounds even remotely similar, and… forget it. Ridiculously, the API includes dictation grammar, which apparently covers big part of the language thesaurus. This option is totally useless, no matter how good the user's pronunciation is.

It's noteworthy that, say, on Android you can install speech recognition as yet another keyboard. You can practically use speech input in dictation mode in several languages, with the fidelity which can really compete with on-screen virtual keyboards.

—SA


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

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