Can i use two or more Microsoft Speech Recognition (Microsoft Speech Platform v11) engines at the same machine (with same language)? RRS feed

  • Question

  • Can i use two or more Microsoft Speech Recognition engines at the same machine (with same language)?

    I have task on speech recognition and i try to recognize too big grammar (2000+ words).

    So, i think to divide this big grammar on two grammars. One grammar load to first engine and other-at second.

    But i do not know- is this SpeechRecognitinEngine instances referenced to 2 difference speech engines or it just linked to one engine?

    Here is my code:

                List<String> words1 = new List<string>();

                List<String> words2 = new List<string>();

                var gr1 = MakeGrammar("gr1", words1);
                var gr2 = MakeGrammar("gr2", words2);

                var gr3 = MakeGrammar("gr1", words1); // create new grammar with name gr1- to check on grammar unic name exception.

                MicSpeechRecEngine1.LoadGrammar(gr1);  (where MicSpeechRecEngine is SpeechRecognitionEngine)


     public static Grammar MakeGrammar(String name,List<String> words)
                Choices choises = new Choices();
                GrammarBuilder gb = new GrammarBuilder();
                gb.Culture = new CultureInfo("en-US");

                if (choises == null)
                    throw new NullReferenceException("choises is null!");
                if (words == null)
                    throw new NullReferenceException("Words is null!");

                if (gb != null)
                    gb.Append(choises, 0, 10);
                Grammar g = new Grammar(gb);
                g.Name = name;
                g.Priority = 0;
                g.Weight = 1.0f;
                g.Enabled = true;

                return g;

    This code works well- when i say -"one" - it types "one one"-from both engines.

    My point is to make 2 or more engines, load two or more big grammar and if it is recognize on difference engines- get performance (and validate) recognition.

    Thank you!

    Friday, July 3, 2015 11:09 AM