Reply To: My LanguageModelPath is nil

Home Forums OpenEars My LanguageModelPath is nil Reply To: My LanguageModelPath is nil


Sure thing:

2017-04-21 08:27:37.316 EntryPoint[2332:892790] Failed to create directory /var/mobile/Containers/Data/Application/15688114-7E32-45C2-83CD-76C1C521B3CC/Documents/cn1storage/
2017-04-21 08:27:49.856 EntryPoint[2332:892790] Starting OpenEars logging for OpenEars version 2.504 on 64-bit device (or build): iPad running iOS version: 9.300000
2017-04-21 08:27:49.860 EntryPoint[2332:892790] Creating shared instance of OEPocketsphinxController
2017-04-21 08:27:49.881 EntryPoint[2332:892790] User gave mic permission for this app.
2017-04-21 08:27:49.883 EntryPoint[2332:892790] /var/containers/Bundle/Application/xxxxxx9/
2017-04-21 08:27:49.883 EntryPoint[2332:892790] /var/containers/Bundle/Application/xxxxxx9/
2017-04-21 08:27:49.884 EntryPoint[2332:892790] Attempting to start listening session from startListeningWithLanguageModelAtPath:
2017-04-21 08:27:49.885 EntryPoint[2332:892790] 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 language model, that means the correct path to your language model that you should pass to this method's languageModelPath argument is as follows:

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

Feel free to copy and paste this code for your path to your language model, but remember to replace the part that says "TheNameIChoseForMyVocabulary" with the name you actually chose for your language model 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.