- This topic has 8 replies, 2 voices, and was last updated 8 years, 10 months ago by Halle Winkler.
-
AuthorPosts
-
June 8, 2015 at 4:48 pm #1025953jvanroekelParticipant
If I do the following, will the observer still be active after the 2nd startListening()? In other words, is the list of observers independent of whether the controller is listening?
startListening()
create an observer
stopListening()
startListening()Thanks
June 8, 2015 at 4:53 pm #1025954Halle WinklerPolitepixWelcome,
Can you clarify your question a bit? There isn’t anything I would describe as observer creation in OpenEars, or a startListening() function.
June 8, 2015 at 11:04 pm #1025955jvanroekelParticipantI am very sorry, I was being sloppy.
I meant startRealtimeListeningWithLanguageModelAtPath in RapidEars.
Clearly when I create an OEEventsObserver and assign a delegate, a connection is made to the singleton OEPocketsphinxController object. Is this lost when I call stopListening or can I restart listening and still have the observer delegate receive callbacks.
Thanks
June 9, 2015 at 8:15 am #1025958Halle WinklerPolitepixHi,
Clearly when I create an OEEventsObserver and assign a delegate, a connection is made to the singleton OEPocketsphinxController object.
Although OEPocketsphinxController is able to send notifications to an OEEventsObserver if it exists, and to receive notifications from one if it exists, these two separate classes do not make connections to each other and their respective lifecycles are not connected.
June 9, 2015 at 9:09 am #1025960Halle WinklerPolitepixI wanted to mention that OEEventsObserver has to be a property of your class in which you are using it, and that it needs to be instantiated before any calls to begin OEPocketsphinxController listening in order to provide information about the listening startup process. It is usually instantiated when the hosting view controller is initialized or when its view is loaded.
Creating them at the moment of need and then uncreating them isn’t how they are designed – instead, management of which events to react to and when is handled by choosing the callbacks to use and having logic within them for what to do under which circumstance.
You can check out the tutorial or the sample app in order to see how OEEventsObserver is managed in them.
June 9, 2015 at 4:28 pm #1025963jvanroekelParticipantThanks, Halle.
I’m trying to provide the option for the user to disable/enable voice control such that there is no overhead associated with the controller. I worried that even though I can suspend/resume the controller, it is still consuming CPU time.
My plan now is to create all my OEEventsObserver and proxies first. Then call startRealtimeListeningWithLanguageModelAtPath only if the user has enabled voice control. I can call stopListinging later if the user disables voice input.
I expect to make the final decision to purchase Rapid Ears soon, although the price is daunting for an individual developer.
BTW, I really appreciate the way you have set up the demo version of RapidEars. I’m able to do a complete evaluation before purchasing.
If you are interested, I’m adding voice control (and later Google Cardboard support) to my app, Walkers 3D. http://walkers3d.com
John
June 9, 2015 at 4:36 pm #1025964Halle WinklerPolitepixBoth suspend and resume, and starting and stopping, are the same in terms of CPU overhead – OEPocketsphinxController won’t put the CPU to any work while either suspended or stopped. Just don’t start and immediately suspend, since it will have a negative effect on calibration.
June 9, 2015 at 4:39 pm #1025965jvanroekelParticipantOk, got it. Thanks so much for the prompt reply.
June 9, 2015 at 4:42 pm #1025966Halle WinklerPolitepixYou’re welcome, good luck with your integration!
-
AuthorPosts
- You must be logged in to reply to this topic.