- This topic has 1 reply, 2 voices, and was last updated 8 years, 4 months ago by Halle Winkler.
-
AuthorPosts
-
December 22, 2015 at 2:17 am #1027620sethfriParticipant
I brought much of the sample code over to my own app with my own custom vocabulary. This works perfectly on the simulator, but when I try to run the code on a real device, I get the following error repeatedly:
2015-12-21 17:11:22.569 MyApp[823:276842] Error: Error Domain=NSOSStatusErrorDomain Code=-1 “(null)”
2015-12-21 17:11:22.569 MyApp[823:276842] Error in render callback: -1I have the following code in
viewDidLoad
:self.fliteController = [[OEFliteController alloc] init]; self.openEarsEventsObserver = [[OEEventsObserver alloc] init]; self.openEarsEventsObserver.delegate = self; self.slt = [[Slt alloc] init]; [OELogging startOpenEarsLogging]; // Uncomment me for OELogging, which is verbose logging about internal OpenEars operations such as audio settings. If you have issues, show this logging in the forums. [OEPocketsphinxController sharedInstance].verbosePocketSphinx = TRUE; // Uncomment this for much more verbose speech recognition engine output. If you have issues, show this logging in the forums. [self.openEarsEventsObserver setDelegate:self]; // Make this class the delegate of OpenEarsObserver so we can get all of the messages about what OpenEars is doing. [[OEPocketsphinxController sharedInstance] setActive:TRUE error:nil]; // Call this before setting any OEPocketsphinxController characteristics // This is the language model we're going to start up with. The only reason I'm making it a class property is that I reuse it a bunch of times in this example, // but you can pass the string contents directly to OEPocketsphinxController:startListeningWithLanguageModelAtPath:dictionaryAtPath:languageModelIsJSGF: NSArray *firstLanguageArray = @[@"TEST"]; OELanguageModelGenerator *languageModelGenerator = [[OELanguageModelGenerator alloc] init]; languageModelGenerator.verboseLanguageModelGenerator = YES; // Uncomment me for verbose language model generator debug output. NSError *error = [languageModelGenerator generateLanguageModelFromArray:firstLanguageArray withFilesNamed:@"FirstOpenEarsDynamicLanguageModel" forAcousticModelAtPath:[OEAcousticModel pathToModel:@"AcousticModelEnglish"]]; // Change "AcousticModelEnglish" to "AcousticModelSpanish" in order to create a language model for Spanish recognition instead of English. if (error) { NSLog(@"Dynamic language generator reported error %@", [error description]); } else { NSString *languageModelPath = [languageModelGenerator pathToSuccessfullyGeneratedLanguageModelWithRequestedName:@"FirstOpenEarsDynamicLanguageModel"]; NSString *languageDictionaryPath = [languageModelGenerator pathToSuccessfullyGeneratedDictionaryWithRequestedName:@"FirstOpenEarsDynamicLanguageModel"]; if(![OEPocketsphinxController sharedInstance].isListening) { [[OEPocketsphinxController sharedInstance] startListeningWithLanguageModelAtPath:languageModelPath dictionaryAtPath:languageDictionaryPath acousticModelAtPath:[OEAcousticModel pathToModel:@"AcousticModelEnglish"] languageModelIsJSGF:NO]; // Start speech recognition if we aren't already listening. } }
December 22, 2015 at 6:11 am #1027622Halle WinklerPolitepixHi,
Does your app have mic permission? Otherwise I’ve never heard of an audio render error when using OpenEars (even a permission problem should give some logging info), but you can show your logging results to learn more: Please read before you post – how to troubleshoot and provide logging info here.
You may have already found these, but the tutorial can also be useful for a first integration: https://www.politepix.com/openears/tutorial
and here’s the general FAQ: https://www.politepix.com/openears/support
-
AuthorPosts
- You must be logged in to reply to this topic.