pocketsphinx.js icon indicating copy to clipboard operation
pocketsphinx.js copied to clipboard

Continuous mode for keyword and grammar speech recognition

Open nigma opened this issue 7 years ago • 0 comments

I'm trying to replicate the pocketsphinx_continuous continuous recognition mode so that pocketsphinx.js can automatically detect end of utterance, report final result and listen for new utterance without asking a user to press on start/stop button.

I ported the code from the command line tool recognize_from_microphone() into https://github.com/nigma/pocketsphinx.js/commit/667c36d0eba4cef44b5fc682f4cb723b3b359800#diff-a249a9d436a0eda388947a17e66f45eeR132.

It compiles and runs fine in a browser (using the same config as in the command line) and I can access additional decoder parameters, however end of utterance is never detected because the ps_get_in_speech() always returns true.

I assume audio recorded from browser with recognizer.js/audioRecorder.js is not distorted in a way that is misleading to the decoder.

What may be the cause the ps_get_in_speech function fails to detect silence and end of speech when called from the JS code?

Thanks

nigma avatar Sep 12 '16 14:09 nigma