How to recognise speech after suspend

Home Forums OpenEars How to recognise speech after suspend

Tagged: 

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

  • Author
    Posts
  • #1024907
    protspace
    Participant

    Hello.
    In my app there is a timer (about 2 seconds) for user to speak. After that i call [[OEPocketsphinxController sharedInstance] suspendRecognition]. User then can resume the recognition by button.

    Sometimes OpenEars doesn’t pocketsphinxDidDetectFinishedSpeech even if user stops talking in 1 second. Is there any way to force recognise the word user said?

    #1024908
    Halle Winkler
    Politepix

    Welcome,

    I don’t quite understand the question yet – can you clarify it for me, maybe with specific examples?

    #1024910
    protspace
    Participant

    Ok. So my app does not listen the user all the time. The user pushes button and then talks. The talking “session” lasts for about 2 seconds and then stops programmatically by timer (suspendRecognition). But there are cases when user said the word but it is not recognised though there was 1 second of silence. Is there any way toto make framework to make recognition after suspendRecognition occured?

    In other words is there any way to perform recognition not after “0.7 seconds of silence” as said in manual, but by pressing button or calling suspendRecognition method?

    #1024912
    Halle Winkler
    Politepix

    Sorry, no. Generally, I encourage developers not to use this design of emulating a push-to-talk recognizer with a continuous recognizer because it fights the design of the library. In your case, the interesting question is why recognition isn’t completing when there is silence – that isn’t the way the library usually functions so maybe that is worth doing some troubleshooting on.

    However, there is a this method which performs recognition on an arbitrary complete WAV file:

    - (void) runRecognitionOnWavFileAtPath: (NSString *) usingLanguageModelAtPath: (NSString *) dictionaryAtPath: (NSString *) acousticModelAtPath: (NSString *)
    languageModelIsJSGF: (BOOL)
    wavPath languageModelPath dictionaryPath acousticModelPath languageModelIsJSGF
    

    So if all you want to do is perform recognition on a recording you’ve made, just capture a WAV on button press using one of the many ways to do that with iOS and after two seconds, stop capturing it and submit it to runRecognitionOnWavFileAtPath:. It will need to be mono PCM, 16-bit and 16k.

    #1024915
    protspace
    Participant

    Thank you for quick reply. I’ll try!

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