2

I have a service that is implementing RecognitionListener (like this: Android Speech Recognition as a service on Android 4.1 & 4.2) where I have to override onBufferReceived(byte[]) method. I was investigating why the speech recognition is much slower to call onResults() on <=ICS . The only difference I could find was that onBufferReceived is called on phones <= ICS. On JellyBean the onBufferReceived() is never called and onResults() is called significantly faster and I'm thinking its because of the overhead to call onBufferReceived every second or millisecond. Has any one else run into this and is there a workaround?

UPDATE

  1. The phone I tested on above is 2.2.2 (LG)

  2. I tested another phone running Android 2.2.1(Samsung) and I'm seeing the same issue.

  3. An HTC Evo running 2.33 is faster than 1 & 2 above but still significantly slower than my HTC One running Jellybean 4.3

All are using a wifi connection.

It seems in the slow cases, the Google server just takes much longer to call onResults() --- I'm thinking it has to be a Android version issue as it appears Google has sped this process up with each newer Android release.

Community
  • 1
  • 1
Mike6679
  • 5,547
  • 19
  • 63
  • 108
  • Maybe you do too much in onBufferReceived, just do nothing and see if it is faster. I used mime on OS 2.2 and have no problem. If the phone is on 3G instead of 4G, then it is extremely slow. – Hoan Nguyen Jan 29 '14 at 08:42
  • 1
    I don't do anything in in onBufferReceived() , I just override it because its required. I believe both my test phones (Android 2.2 & 4.2) are using a wifi connection but I will verify... – Mike6679 Jan 29 '14 at 14:50
  • @Mike I have the opposite problem: On Android 2.2 (Nexus 1) speech recognizer start immediately and speech recognition is very fast, while on Android 4.1 (Nexus S), both recognizer start and speech recognition are painfully slow, similar to what's described in this [Google Now Slow to start voice search](http://forums.androidcentral.com/google-samsung-galaxy-nexus/193426-google-now-slow-start-voice-search.html) thread and this [Voice to text since upgrade to jelly bean](http://bit.ly/1CipzBq) thread. Any idea how to overcome this? – sfinja Jan 30 '15 at 02:58

0 Answers0