How to properly deactivate OpenEars?

Home Forums OpenEars How to properly deactivate OpenEars?

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

  • Author
    Posts
  • #1029690
    montbonnot
    Participant

    Hi,

    I went over the FAQ and forum a couple of times and saw some info about using multiple Audio frameworks and all the related problems. Basically due to the AVAudioSession limitation. I cannot run OpenEars and another audio library at the same time which I understand.

    Though, I still have a question. Is there a simple way of deactivating OpenEars (OEPocketsphinxController) entirely so that it wouldn’t listen or use any audio feature at all (no AVAudioSession, etc.)?

    My use case needs either Speech Recognition (OpenEars) or an Audio Player (EZAudioPlayer). I don’t need to connect the two nor to use them at the same time. They are mutually exclusive but they are offered as features in the same app. How can I properly deactivate the speech recognition so that I can start using the audio player?

    Notes: I started from the sample app available.

    Thanks a lot!

    #1029699
    Halle Winkler
    Politepix

    Welcome,

    Call stopListening (this is where all of the session and audio unit cleanup is done), wait for the pocketsphinxDidStopListening delegate callback, then call [[OEPocketsphinxController sharedInstance] setActive:FALSE error:nil].

    If the other framework instantiates its session needs correctly, this should be sufficient to let it do what it needs to.

    #1029711
    montbonnot
    Participant

    Thanks for the quick answer. That’s what I needed and it works well!

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