Error on Device – Error in render callback

Home Forums OpenEars Error on Device – Error in render callback

Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)

  • Author
  • #1027620

    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: -1

    I 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
                                                                                 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
                                                                             acousticModelAtPath:[OEAcousticModel pathToModel:@"AcousticModelEnglish"]
                                                                             languageModelIsJSGF:NO]; // Start speech recognition if we aren't already listening.
    Halle Winkler


    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:

    and here’s the general FAQ:

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.