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

问题描述

大家好,



我创建了一个连续语音识别程序,但其准确性非常低。请帮我。我写的代码是问题吗?





Hi All,

I am created a program for continuous speech recognition, but its accuracy is very low. Please help me. I have written code that is the problem?


using SpeechLib;

namespace Speech_Recognition
{
    public partial class SRForm : Form
    {
        private SpeechLib.SpSharedRecoContext objRecoContext;
        private SpeechLib.ISpeechRecoGrammar grammar;
        public SRForm()
        {
            InitializeComponent();
            initSAPI();
        }

        private void initSAPI()
        {
            try
            {
                //Create Instance The Main Object (SpSharedRecoContext)And Activating The Recognition Event
                objRecoContext = new SpeechLib.SpSharedRecoContext();
                objRecoContext.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler(RecoContext_Recognition);
                objRecoContext.EventInterests = SpeechLib.SpeechRecoEvents.SRERecognition | SpeechLib.SpeechRecoEvents.SREAudioLevel;
                //Grammar Creation with Default Value 'ID = 0' And Grammar Activation
               grammar = objRecoContext.CreateGrammar(0);
               grammar.DictationSetState(SpeechRuleState.SGDSActive);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Exception \n" + ex.ToString(), "Error - initSAPI");
            }
        }
        //---------------------------------------------------------------------------------------------------------

        //Main ObjRecoContext Event And launched when engine recognized a phrase
        public void RecoContext_Recognition(int StreamNumber, object StreamPosition, SpeechRecognitionType RecognitionType, ISpeechRecoResult e)
        {
            //Get And Display Phrase
            string phrase = e.PhraseInfo.GetText(0, -1, true);
           richTextBox1.Text+= phrase + " ";
        }
    }
}





先谢谢。



Thanks in Advance.

推荐答案


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

06-05 16:14