locked
Interesting Error when speech to tex RRS feed

  • Question

  • Hi everybody.Now ı workıng for speech to text.But I couldnt do ıt yet.I have example

     private void button1_Click(object sender, EventArgs e)
            {
                // Speech Recognition Object
                SpSharedRecoContext listener=null;
                // Grammar object
                ISpeechRecoGrammar grammar=null;

                listener = new SpeechLib.SpSharedRecoContext();
                listener.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler (listener_Reco);
                grammar = listener.CreateGrammar(0);
                grammar.DictationLoad("", SpeechLoadOption.SLOStatic);
                grammar.DictationSetState(SpeechRuleState.SGDSActive);
            }
            public void listener_Reco(int StreamNumber, object StreamPosition, SpeechRecognitionType RecognitionType, ISpeechRecoResult Result)
            {
                string heard = Result.PhraseInfo.GetText(0, -1, true);
                richTextBox1.Text += heard;
            }

    When I run thıs code I have an error.it is :
    from IClassFactory {47206204-5ECA-11D2-960F-00C04F8EE628} CLSID to create instances of COM components with sine operation failed with the following error: 80045077.

    Can Anyone help me about speech to text please ......
    Wednesday, October 28, 2009 5:10 PM