How to leave TTS constantly running in background?
I build a fun little TTS/STT app to entertain my self a while back. I worked well, but had one crucial flaw:开发者_StackOverflow社区 when I would want to actually use the STT engine, a dialog would pop up telling it when to stop recording. For my next project, this is out of the question. Aside from completely stopping to user from bwing able to advance in my app, it's down right ugly. I need the app to constantly listen for words and not stop the app.
So Is there a way to have Speech Capture run in the background constantly? Maybe have a listener that fires off onVoiceInEvents?
Look at http://developer.android.com/reference/android/speech/SpeechRecognizer.html: this is the background speech recognizer. You can run it from a Service and restart it every time it delivers you some converted speech.
精彩评论