Reputation: 7536
I am developing android application. I my application I need speech recognition.But I need speech recognition as service. I already create simple speech recognition in which when I click on button it start recognizer intent.It works fine and gives me output. But what I need when user click on button speech recognition start as service (in background).When user start specking it start recognizer and give me output.
I read few questions regarding this but not getting proper solution to this kind of functionality. Is there any way to implement this?
Upvotes: 0
Views: 12419
Reputation: 12159
There is some code that does exactly what you need here:
See it running by downloading this app.
The code is a Service
that runs in the background, listening for the users speech. When the user speaks a certain word, it fires an Intent
. The Service
also puts up a handy Notification
while it is listening. There is some other code that starts and stops it here.
Upvotes: 3