语音识别器无法识别某些单词! [英] Speech recognizer can't recognise some words !

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

问题描述

http://chupanhcuoi.com.vn/temp/Untitled.png
我有一个小型测试应用程序(对不起,因为源代码是从其他程序复制并由我编辑的),它可以从第一个文本框中的单词中识别单词.该程序可以用某些词完美地工作,但是用某些词却无法工作.例如,我的输入是一二三车书"(语法中包含五个词).该程序可以轻松识别1,2,3,但我永远无法使其识别汽车和书本.

任何人都可以帮助我解释为什么?还是有任何解决方案可以强制以编程方式训练语音识别器中的汽车"和书"这个词?
对不起,我的英语不是母语.

这是我的项目zip文件: http://chupanhcuoi.com.vn/temp/SpeechTest.zip [ ^ ]

抱歉,我不知道如何上传到codeproject.com
语音识别器的代码是从211行到256行.

http://chupanhcuoi.com.vn/temp/Untitled.png
I have this small test application(sorry because the source code is copied from other and edited by me), which can recognize word from the words in the first textbox. the program works perfect with some words, but with somes, it never works. For a sample, my input is "one two three car book" (there are five words contained in the grammar). And the program can recognize 1,2,3 easily, but I can never make it recognize car, and book.

Any one can help me explain why ? Or is there any solution which can force to train the speech recognizer the word "car" and "book" programmatically ?

Sorry for my English, I''m not a native speaker.

Here is my project zip file : http://chupanhcuoi.com.vn/temp/SpeechTest.zip[^]

Sorry that I dont know how to upload to codeproject.com
the code for speech recognizer is from line 211 to line 256.

private void cmdEnable_Click(object sender, System.EventArgs e)//button to start recognizer
{
    if (xpmode)
    {
//ignore this because these code is for window xp

    }
    else
    {
        if (!recInited)
        {
//if the button is click the first time, init variables 
            recognizer = new SpeechRecognitionEngine();
            recognizer.SetInputToDefaultAudioDevice();
            recognizer.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(recognizer_SpeechRecognized);
        }
        else
        {
            if (recognizer != null)
            {
//stop the old recognizer for new grammars defined in the textbox
                recognizer.RecognizeAsyncStop();
            }
        }
        changerecDict();
        recognizer.RecognizeAsync(RecognizeMode.Multiple);//TurnSpeechRecognitionOn
        recInited = true;
    }
}
void changerecDict()
{
    recogniseDict = grammartext.Text.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    if (xpmode)
    {
    }
    else
    {
        recognizer.UnloadAllGrammars();
        recognizer.LoadGrammar(new Grammar(new GrammarBuilder(new Choices(recogniseDict)))); //[string] contains {"one","two","three","car","book"
    }
}
//event 4 xp
private void Reco_Event(int StreamNumber, object StreamPosition,SpeechRecognitionType RecognitionType,ISpeechRecoResult Result)
{
//ignore
}
//event 4 7
private void recognizer_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
{
    txtReco.Text = e.Result.Text + " " + e.Result.Confidence;
}

推荐答案

我认为您不能将代码归咎于该问题.这是技术水平,…您的发音.

是英文吗?甚至我也经常误解越南人用英语发音的一些单词.同时,许多以英语为母语的人(我不是)通常比我更了解他们.语音识别技术需要很长的路要走到这一水平. :-)


您的代码无法构建,因此我无法对其进行测试(VS 2008、2010).为什么使用SpeechLib?您只需要System.Speech.我知道我在说什么,因为我已经做了这样的应用程序-它们不能很好地工作,因为命令口音很重.我的口音也很明显,但是如果语法相当小并且没有非常相似的命令,我的应用程序就可以很好地处理它.

请不要发布您的回复作为解决方案.使用改善问题",添加评论"或回复其他评论.

—SA
I don''t think you can blame your code for that problem. This is the level of technology and… you pronunciation.

Is it English? Even I often misunderstand some words pronounced in English by people from Vietnam. At the same time, many native English speakers (I''m not) usually understand them better then I do. Speech recognition technology needs a long way to grow to this level. :-)


Your code failed to build, so I could not test it (VS 2008, 2010). Why do you use SpeechLib? All you need is System.Speech. I know what I say because I have done such applications — they do not work well is commands are spoken with strong accent. I also have quite noticeable accent but my applications deal well with it if the grammar is reasonably small and there are no very similar commands.

Please don''t post your responses as solution. Use "Improve question", "Add comment" or reply to other comments.

—SA


这篇关于语音识别器无法识别某些单词!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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