Mohammed Khalaila
Mohammed Khalaila

Reputation: 23

Merging two grammars with speech recognition

I'm using C# to make a speech recognition application and I'm trying to use multiple grammars at the same time.

What I mean is getting words from both grammars with the same sentence.

For example:

grammar-A-(calculate,search,open)
grammar-B-(10,0,1,+,-,google,youtube,gangnam style , for)

And the recognized sentence will be calculate 10-10 or search youtube for gangnam style

Can I do that?

Upvotes: 0

Views: 392

Answers (2)

Zunair
Zunair

Reputation: 1195

You can combine the grammar as answered by a user here. But Grammar does not work like as you are thinking. You will have to make another system to handle after recognition is done.

As far as grammar goes, if you put in grammar-A-(calculate,search,open), grammar-B-(10,0,1,+,-,google,youtube,gangnam style , for) It will only recognize "calculate", "search", "youtube", "google" etc.. one string at a time. It will not recognize the full sentence when using simple strings as grammar.

To do that you might be able use complex rules. See "Microsoft Speech Platform SDK" chm file and en-US.grxml

Thanks

AI-Dot.net

Upvotes: 0

Deepak Sharma
Deepak Sharma

Reputation: 4170

you can load the multiple grammars.

urRecognizer.LoadGrammar(grammar_A);
urRecognizer.LoadGrammar(grammar_B);

Upvotes: 1

Related Questions