Using RapidEars and the SampleApp

Home Forums OpenEars plugins Using RapidEars and the SampleApp

Tagged: 

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

  • Author
    Posts
  • #10566
    lookbadgers
    Participant

    I have just tried adding RapidEars to the sampleApp. The app compiles but fails to run.

    xCode fails on line 16 OpenEarsSampleApp/Supporting Files/main.m

    https://www.politepix.com/rapidears/

    I had to adapt the guide slightly this line is not right:

    “Then replace all of the other occurences of startListeningWithLanguageModelAtPath: with startRealtimeListeningWithLanguageModelAtPath:”

    Instead I replaced it with

    [self.pocketsphinxController startRealtimeListeningWithLanguageModelAtPath:self.pathToGrammarToStartAppWith andDictionaryAtPath:self.pathToDictionaryToStartAppWith]; // Starts the rapid recognition loop.

    Thanks

    #10567
    Halle Winkler
    Politepix

    Hi,

    Sorry you are having difficulty integrating the plugin. Please turn on logging and show the output so I can assist — the instructions are known to work so there must be a minor implementation issue which the OpenEars logging may assist with. Here is a link to how to turn logging on: https://www.politepix.com/openears/yourapp/#logging

    Can you elaborate on what the difference is between your correction and the original instructions? They look like they are the same to me but maybe I am overlooking something.

    Just checking since I recall you are using an earlier version of OpenEars, did you follow the instructions to update to OpenEars 1.1 before adding RapidEars?

    #10568
    lookbadgers
    Participant

    Hi,

    No problem I assume it’s probably something simple I’ve missed at my end.

    The log is here: https://pastebin.com/dcefjGdw

    I replaced
    [self.pocketsphinxController startListeningWithLanguageModelAtPath:self.pathToGrammarToStartAppWith dictionaryAtPath:self.pathToDictionaryToStartAppWith languageModelIsJSGF:FALSE];

    With the following:
    [self.pocketsphinxController startRealtimeListeningWithLanguageModelAtPath:self.pathToGrammarToStartAppWith andDictionaryAtPath:self.pathToDictionaryToStartAppWith];

    I downloaded a new version of OpenEars from https://www.politepix.com/openears/ so I assume that is compatible and avoids the issue of upgrading.

    Thanks

    #10569
    Halle Winkler
    Politepix

    Based on the log, the plugin isn’t being used at all in the project since the error is that a method that is in the plugin isn’t available to the project. Can you elaborate on your comment:

    had to adapt the guide slightly this line is not right:

    “Then replace all of the other occurences of startListeningWithLanguageModelAtPath: with startRealtimeListeningWithLanguageModelAtPath:”

    Instead I replaced it with

    [self.pocketsphinxController startRealtimeListeningWithLanguageModelAtPath:self.pathToGrammarToStartAppWith andDictionaryAtPath:self.pathToDictionaryToStartAppWith]; // Starts the rapid recognition loop.

    Since the instructions say to replace all of the references to startListeningWithLanguageModelAtPath: with startRealtimeListeningWithLanguageModelAtPath:, which appears to be what you did? I’m still confused about what part of the instructions you are saying wasn’t right and I think maybe this could be related to the issue you’re experiencing.

    My impression is that the plugin isn’t added to the project target, or it isn’t being imported into the class in which you are using it by following these lines from the instructions:

    1. Open up ViewController.m in the editor and up at the top where the header imports are, after the line:

    #import <OpenEars/PocketsphinxController.h>
    add the following lines:

    #import <RapidEarsDemo/PocketsphinxController+RapidEars.h>
    #import <RapidEarsDemo/OpenEarsEventsObserver+RapidEars.h>

    #10578
    lookbadgers
    Participant

    Those lines are included, here’s a screenshot that shows them and the RapidEarsDemo.framework included.
    http://imageshack.us/photo/my-images/688/screenshot20120718at171.png/

    What I mean is it doesn’t mention changing following part of the method call.

    dictionaryAtPath:self.pathToDictionaryToStartAppWith languageModelIsJSGF:FALSE

    to

    andDictionaryAtPath:self.pathToDictionaryToStartAppWith

    #10579
    Halle Winkler
    Politepix

    OK, that line is just intended to refer to changing all of the incidents of the old-style recognition start to the new-style recognition start (since it occurs many times in the sample app) in the same way as the example that comes right before it, but if it’s unclear as-is I can revise it to be clearer, thanks for the feedback.

    All righty, I’m not sure what the issue is with the project so could you put up your modified sample app somewhere for me to download and take a look at? You can remove the OpenEars framework from the sample app folder to save file size if you want (but don’t remove the RapidEars plugin since I need to see how that is connected to the project). Thanks!

    #10580
    lookbadgers
    Participant

    I think for clarity I would prefer it, at first I thought I was doing something wrong.

    I’ve zipped everything up, both frameworks are included by reference though so I’m not sure if this will have everything you need.

    http://www.yousendit.com/download/QlVna0ZkRkVCSWQzZU5Vag

    #10581
    Halle Winkler
    Politepix

    I think for clarity I would prefer it, at first I thought I was doing something wrong.

    OK, good to know that should be improved. I will need to take a look at your project in-depth a little later when I can reattach the references, but the only thing I noticed right off the bat is that you’ve added the -ObjC flag correctly but only for release and not debug. I guess if you’re then running it in debug it will probably be sad :) . Is it possible this is the issue?

    #10582
    lookbadgers
    Participant

    Thank you, you are correct. I’ve just added the flag to debug as well, I was certain I put it for both. The app is no longer sad :)

    #10583
    Halle Winkler
    Politepix

    Excellent :) . Give it a try on a device for the best recognition quality (the simulator recognition is not so great).

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