2

I am coding a smart assistant and one of the exclusive features is that it listens to you all the time. Is there a way to make Speech to Text active at all times?

Thank you.

joe dacoolguy
  • 309
  • 2
  • 8
  • 18
  • Do you mean when your app is in foreground, or background at all times? – wtsang02 Jul 08 '13 at 15:27
  • Foreground, but I do not want the "listening" window to be visible. And the TTS api must be started on onCreate. I know how to do that though – joe dacoolguy Jul 08 '13 at 15:29
  • Do you mean speech to text? Text to speech doesn't make much sense in the context of always on. – Gabe Sechan Jul 08 '13 at 15:29
  • Yes, I mean speech to text. I am a little deprived of sleep right now. Pardon my mistake. – joe dacoolguy Jul 08 '13 at 15:30
  • Text to speech would be taking text typed in by the user (or generated by your app) and speaking it out loud. Its easy to do whenever you want, but it has nothing to do with listening to you. Speech to text is what listens to you. – Gabe Sechan Jul 08 '13 at 15:31
  • Please check edited comment above. – joe dacoolguy Jul 08 '13 at 15:32
  • No problem. So to answer a bit- you only get that box if you use speech to text via Intent. You can go around using intents by interfacing directly with the voice service, but doing so will require you to code to a particular speech to text service, like Nuance, Google, or Vlingo. You can probably find example code for this in Android's Latin IME keyboard. If you do that, Google Voice is by far the most common to have installed. – Gabe Sechan Jul 08 '13 at 15:36

1 Answers1

1

Your questions + responses seem a bit confused...

"A foreground service is a service that's considered to be something the user is actively aware of and thus not a candidate for the system to kill when low on memory."

http://developer.android.com/guide/components/services.html

Otherwise, the answer is no. Android can at anytime it needs the resources stop executing the code for another process. See above link for further clarification.

Justin
  • 885
  • 9
  • 19
  • [This](http://stackoverflow.com/questions/14940657/android-speech-recognition-as-a-service-on-android-4-1-4-2/14950616#14950616) is what you want – Justin Jul 13 '13 at 03:06