suspend listen at first start

Home Forums OpenEars suspend listen at first start

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

  • Author
    Posts
  • #1024030
    sckramer
    Participant

    Hello,

    Where is the best place to suspend listening at first start? I’ve tried various places but it’s ignored the first time (right after startListeningWithLanguageModelAtPath–) and suspending/resuming works fine after that…

    Thanks!

    #1024033
    Halle Winkler
    Politepix

    Welcome,

    It isn’t a good design for various reasons to suspend immediately after starting. What is the design consideration that is leading to that requirement?

    #1024035
    sckramer
    Participant

    Ok, just checking if it’s an easy option, but agreed and I’ll rethink my design. I built it into it’s own NSObject (gui-less, using NSnotifications to talk to the current viewcontroller) so I can activate it anywhere, and in my case when I first launch the app I load it in viewDidload (with a background queue because there is a 5-7 second delay when you do the “startListening”) but then I need it suspended until the right time in my app.

    So thinking about it more, I’ll load it on the first time it’s needed…

    #1024037
    Halle Winkler
    Politepix

    OK, the new 2.0 design is that OEPocketsphinxController is a singleton, so the design feature of being able to control it from anywhere is now built-in and since there is no more calibration it starts very quickly, so I’d just upgrade to 2.0 and see if the updated design solves some of these problems for you out of the box without needing to start and then suspend.

    #1024038
    sckramer
    Participant

    Cool, did the update to 2.0–

    starts in 2.8 seconds on an iPod touch, 1.5s on iPhone 5, 0.85s on iPad air2

    So I’ll lazy-instantiate it on the first request for speech recognition & call it a day, thanks!

    #1024039
    Halle Winkler
    Politepix

    OK, I’m actually just seeing a .5 second startup on my test devices, so there might even be something delaying that for you which could be reduced with some troubleshooting.

    #1024042
    sckramer
    Participant

    I’ll check it out, Thanks!

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