Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
_recognizer.LoadGrammarAsync(new Grammar(new GrammarBuilder(new Choices(File.ReadAllLines(@"Commands.txt")))));
            _recognizer.LoadGrammar(new DictationGrammar());//





I want to know how can i load a big txt file with this code:


_recognizer.LoadGrammarAsync(new Grammar(new GrammarBuilder(new Choices(File.ReadAllLines(@"Commands.txt")))));




Because when i writte a lot of words form doesn't start, if i can't load a large file text, can i make others txt file to load in this code project? because i don't want to use this code:

_recognizer.LoadGrammar(new DictationGrammar());


Because isn't accurate.


Thanks
Posted
Updated 9-Mar-18 20:12pm
Comments
BillWoodruff 20-Apr-15 13:34pm    
Is this code you wrote ? You might want to give us more of a clue about what you are doing. Are you using 3rd. party (not from Microsoft) tools here ?
Member 11600267 20-Apr-15 14:38pm    
i don't use Microsoft system Bill

You are right, it is not accurate. But if you load big grammar, it also makes the recognition inaccurate; the more the grammar the worse. As soon as you have two or more grammar elements with similar pronunciation, the recognition will make mistakes, the more matches like that, the more mistakes.

There is no much you can do, except finding out better recognition engine (such engines do exist), or waiting until the technology in general grows to something more usable. :-)

—SA
 
Share this answer
 
Some online converter is available on internet but nothing is working. Exp.

https://www.developerfusion.com/tools/convert/csharp-to-python/

https://www.varycode.com/converter.html

both are not working.
This is my C# code
_recognizer.LoadGrammar(new Grammar(new GrammarBuilder(new Choices(File.ReadAllLines(Properties.Resources.Commands)))));
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900