[Resolved] calling suspendRecognition on pocketsphinxRecognitionLoopDidStart

Home Forums OpenEars [Resolved] calling suspendRecognition on pocketsphinxRecognitionLoopDidStart

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

  • Author
    Posts
  • #1024215
    maxgarmar
    Participant

    Hi Halle,

    Another one. When I start my app, I don’t want the library listening directly, must be intended by the user so I am using this code.

    - (void) pocketsphinxRecognitionLoopDidStart {
        
        [[OEPocketsphinxController sharedInstance] suspendRecognition];
    
        
        NSLog(@"Local callback: Pocketsphinx started."); // Log it.
        
        
    }

    The thing is that when I am debugging it does suspend but when I am using the app normally it does not (I guess because when is trying to suspend is not started up completely).

    I guessed that this method is called back when everything is up and running, but perhaps I am wrong. Should I use it in other way ? am I wrong?

    Thanks

    #1024217
    Halle Winkler
    Politepix

    Yes, please don’t start and immediate call suspend. Startup should be fast enough now that there is no more calibration time that it should not be necessary.

    #1024218
    maxgarmar
    Participant

    But then, when should I call to suspendRecognition? If I don’t want my app listening when it starts.

    #1024219
    Halle Winkler
    Politepix

    I’m saying that there is no reason to start listening until you want to listen. The method is called startListening etc.

    #1024220
    Halle Winkler
    Politepix

    To be more specific: starting listening and calling suspend is a workaround that developers came up with in order to hide the calibration time from users. It was a bad workaround because it resulted in the calibration being done against a different environment than the speech which arrived at some arbitrary later point, so you can find a few different 1.x threads here in which I recommend that developers not do it. Now there is no longer any reason for the workaround, since there is no calibration time when you start up, so it’s a good time to let go of the workaround architecture in which startListening is called at a time in which you don’t want to start listening.

    #1024221
    maxgarmar
    Participant

    ok

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