[Solved] What Grammar to use when recognizing letters


You are currently loading two grammers into your recognizer. I believe digits.gram contains numbers.

File menuGrammar = new File(modelsDir, "grammar/menu.gram");
recognizer.addGrammarSearch(MENU_SEARCH, menuGrammar);
File digitsGrammar = new File(modelsDir, "grammar/digits.gram");

So I think what you could do is make a file letter.gram and load it into your program

#JSGF V1.0;
grammar speech;
public <speech> = A |
                  B | 
                  C; 

Code:

File letterGrammar = new File(PUT CORRECT PATH WITH FILE NAME);
recognizer.addGrammarSearch("speech", letterGrammar);

solved What Grammar to use when recognizing letters