pocketsphinx-android
pocketsphinx-android copied to clipboard
Final Result is only posted when calling SpeechRecognizer.stop()
I find it odd that "mainHandler.post(new ResultEvent(hypothesis, true));" is only ever called in SpeechRecognizer.stop(). I would expect the final result to be posted if the main recognizer loop timed out but had a partial result. Maybe I am missing the purpose of "Partial" results and what to expect when the thread times out or when "stop()" is called. Is my "onPartialResult" handler supposed to be handle even the final result? Should I not expect a call to "onResult" unless "stop()" is explicitly called (ex: even if there is a confident match or a timeout)?
If this is a malfunction, then I can whip together a proposed fix or two. If this is normal, then is there some better documentation, other than the demo, of how and when to handle onPartialResult and onResult?
Thanks!
Yes, there is an issue now on timeout behavior, ideally we should extend timeout when we receive results.
I was going to open another issue that the "timeout" is not really a timed timeout, it is a "number of samples timeout". It might make more sense to make this a [Milli] second timeout instead of a sample count timeout.
Right, this is another valid problem. I tried to sync timeout with milliseconds but it seems on many devices there is still no match.