Home › Forums › OpenEars plugins › Using RapidEars and the SampleApp
Tagged: rapidears
- This topic has 9 replies, 2 voices, and was last updated 11 years, 9 months ago by Halle Winkler.
-
AuthorPosts
-
July 18, 2012 at 10:52 am #10566lookbadgersParticipant
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
July 18, 2012 at 11:34 am #10567Halle WinklerPolitepixHi,
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?
July 18, 2012 at 3:07 pm #10568lookbadgersParticipantHi,
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
July 18, 2012 at 3:43 pm #10569Halle WinklerPolitepixBased 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>July 18, 2012 at 5:18 pm #10578lookbadgersParticipantThose 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
July 18, 2012 at 5:40 pm #10579Halle WinklerPolitepixOK, 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!
July 18, 2012 at 5:50 pm #10580lookbadgersParticipantI 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.
July 18, 2012 at 5:55 pm #10581Halle WinklerPolitepixI 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?
July 18, 2012 at 6:06 pm #10582lookbadgersParticipantThank 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 :)
July 18, 2012 at 6:17 pm #10583Halle WinklerPolitepixExcellent :) . Give it a try on a device for the best recognition quality (the simulator recognition is not so great).
-
AuthorPosts
- You must be logged in to reply to this topic.