Multiple pocketsphinxController Controller

Home Forums OpenEars Multiple pocketsphinxController Controller

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

  • Author
  • #1020546

    Hi Concern,

    I have a main view which speaks some details and ask user for Input on the basis of input it navigates to details view controller .

    I want the same functionality on the details view controller , it will ask some question to user and based on response it will perform some action .

    Do i need to have 2 pocketsphinxController controllers or how can i implement functionality in multiple view controller classes.


    In the current scenario i am creating another pocketsphinxController controller object in my details view controller and called a method startListening..
    what is happening is its calling the pocketsphinxDidStartCalibration of my details view controller class and my main view controller class as well, i dont know why it’s happening

    Halle Winkler

    You should only have a single PocketsphinxController in an app. I recommend putting it in a root view controller and communicating with it with delegate methods or notifications. Others have also had success putting it in a singleton which any view controller can communicate with; I don’t support that architecture (i.e. if it gives you issues, I can’t help with them) but there are certainly strong arguments for it. If you want to instantiate a PocketsphinxController in a view and then exit the view in favor of a different view with a different PocketsphinxController, it’s a requirement to first call stopListening before exiting the view so that all the OpenEars multithreading can clean up and ARC can do its job releasing the first PocketsphinxController; otherwise you will have two PocketsphinxControllers which will not work.

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