RecognitionListener in JellyBean Freezes, if not spoken immediately

Speech recognition application, I work well on all versions of Android, starting with API 8 (Android 2.2).

But on the Nexus S 4G (Android 4.1.1), the RecognitionListener will just stop for about 1 minute , then issue ERROR_SERVER via onError () .

If you speak within 1-2 seconds (from this onReadyForSpeech bleep), it will behave correctly as expected.

What has changed in JellyBean that could explain this behavior?

More importantly, is there a way to make it behave like in older versions of Android? (i.e. continue listening, then issue the message ERROR_SPEECH_TIMEOUT if the default message was not pronounced for 10 seconds )

+8
android speech-recognition android-4.2-jelly-bean
Jan 02 '13 at 4:01
source share
2 answers

I ended up using the solution suggested by @scriptocalypse

Thanks @scriptocalypse!

(I did not have the opportunity to try the solution suggested by @HoanNguyen because it implements a service that is beyond the scope of my small application, but it looks promising. Thanks @HoanNguyen, too.)

+1
Mar 25 '13 at 19:30
source share

There is a similar post here , in which it is proposed to simply resume listening when receiving the result ERROR_TIMEOUT_SPEECH.

-2
Jan 08 '13 at 21:05
source share



All Articles