Reply To: problems using generateGrammarFromDictionary

Home Forums OpenEars problems using generateGrammarFromDictionary Reply To: problems using generateGrammarFromDictionary

#1022082
Halle Winkler
Politepix

Welcome,

Couple things:

1. If you set PocketsphinxController’s verbosePocketsphinx property to TRUE you can see what happens in the recognition loop when it doesn’t work. This is probably the most important debugging step after turning on OpenEarsLogging (which I see you did).

2. I see the code where you create a language model and create a grammar, but without seeing the code where you start listening I can’t say why it may or may not be working because I don’t know which of those two items you are starting the loop with and how you invoked the method.

3. Let’s create smaller test cases in order to share code here, since it’s a bit too much to scan through.

4. This array is malformed (don’t know why it compiles) due to a lack of a comma and it ends up with a malformed word “ROBOTTWENTY” in your language model which will reduce recognition quality:

NSArray *firstLanguageArray = [[NSArray alloc] initWithArray:[NSArray arrayWithObjects: // All capital letters.
@"ONE", @"TWO", @"TWENTY", @"10", @"30", @"24",
@"HELLO", @"COMPUTER", @"GREETINGS", @"ROBOT"
@"TWENTY FIVE",
@"BACKWARD",
@"CHANGE",
@"FORWARD",
@"GO",
@"MOVE", @"EXECUTE", @"DO", @"IT", @"THANK", @"YOU",
@"LEFT",
@"RIGHT",
nil]];