Reply To: Recognize short Command in nonEnglish

Home Forums OpenEars Recognize short Command in nonEnglish Reply To: Recognize short Command in nonEnglish


With RuleORama, I end up with the following error (see log below). Can you please tell me what is still wrong ? And also, how does the words-array now need to look like. It seems that RuleORama wants a different one ???

Here is the RuleORama-log: (..still not sure if I translated all ObjC-Code from the manual correctly to Swift)….

2018-04-23 14:08:20.169350+0300 TestOpenEars[4109:2062039] Error: Error Domain=com.politepix.openears Code=6000 "Language model has no content." UserInfo={NSLocalizedDescription=Language model has no content.}
2018-04-23 14:08:20.170097+0300 TestOpenEars[4109:2062039] It wasn't possible to create this grammar: {
    OneOfTheseWillBeSaidOnce =     (
        "esch do no frey"
Error while creating initial language model: Optional(Error Domain=LanguageModelErrorDomain Code=10040 "It wasn't possible to generate a grammar for this dictionary, please turn on OELogging for more information" UserInfo={NSLocalizedDescription=It wasn't possible to generate a grammar for this dictionary, please turn on OELogging for more information})
2018-04-23 14:08:20.170989+0300 TestOpenEars[4109:2062039] Starting OpenEars logging for OpenEars version 2.506 on 64-bit device (or build): iPhone running iOS version: 11.300000
2018-04-23 14:08:20.171130+0300 TestOpenEars[4109:2062039] Creating shared instance of OEPocketsphinxController
2018-04-23 14:08:20.177706+0300 TestOpenEars[4109:2062039] Attempting to start listening session from startListeningWithLanguageModelAtPath:
2018-04-23 14:08:20.177741+0300 TestOpenEars[4109:2062039] Error: you have invoked the method:

startListeningWithLanguageModelAtPath:(NSString *)languageModelPath dictionaryAtPath:(NSString *)dictionaryPath acousticModelAtPath:(NSString *)acousticModelPath languageModelIsJSGF:(BOOL)languageModelIsJSGF

with a languageModelPath which is nil. If your call to OELanguageModelGenerator did not return an error when you generated this grammar, that means the correct path to your grammar that you should pass to this method's languageModelPath argument is as follows:

NSString *correctPathToMyLanguageModelFile = [myLanguageModelGenerator pathToSuccessfullyGeneratedGrammarWithRequestedName:@"TheNameIChoseForMyVocabulary"];

Feel free to copy and paste this code for your path to your grammar, but remember to replace the part that says "TheNameIChoseForMyVocabulary" with the name you actually chose for your grammar or you will get this error again (and replace myLanguageModelGenerator with the name of your OELanguageModelGenerator instance). Since this file is required, expect an exception or undocumented behavior shortly.