Reply To: Mixing JSGF and default using changeLanguageModelToFile

Home Forums OpenEars Mixing JSGF and default using changeLanguageModelToFile Reply To: Mixing JSGF and default using changeLanguageModelToFile

#1025457
ekobres
Participant

Well, looking at your code and where I would replicate I found this comment:

            // You can only change language models with ARPA grammars in OpenEars (the ones that end in .languagemodel or .DMP). 
            // Trying to switch between JSGF models (the ones that end in .gram) will return no result.
            [[OEPocketsphinxController sharedInstance] changeLanguageModelToFile:self.pathToSecondDynamicallyGeneratedLanguageModel withDictionary:self.pathToSecondDynamicallyGeneratedDictionary]; 
            self.usingStartingLanguageModel = FALSE;
        } else { // If we're on the dynamically generated model, switch to the start model (this is just an example of a trigger and method for switching models).
            [[OEPocketsphinxController sharedInstance] changeLanguageModelToFile:self.pathToFirstDynamicallyGeneratedLanguageModel withDictionary:self.pathToFirstDynamicallyGeneratedDictionary];
            self.usingStartingLanguageModel = TRUE;
        }

I’m trying to change language models with .gram files – so I suspect that’s why it’s not working. Although it does crash rather than “do nothing.” Do you still believe it should just work given these comments in the sample app code?