Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Constantly-on speech recognition listening for just one keyword

Tags:

I have tried to code this with Android's included android.speech.SpeechRecognizer class with no success.

Basically, what I am trying to do is making my app constantly listen for one keyword that will fire an intent whenever the keyword is recognized. I know that this will use a lot of battery.

For example - you are talking with a person. Normal conversation. The phone is actively listening and recognizing every single said word and listening for the keyword.

Let's say the keyword is "cheese" in this instance.

Whenever you say "cheese," the application fires an intent that starts up another part of the app.

I have tried to use speech recognition as a service but things didn't really go as planned. Maybe I did a mistake, I don't know.

I've been trying to accomplish this for 2 days in a row now, for more than 24 hours work time combined. If I am being too broad or infringing any of SO's rules, I sincerely apologize and ask my question to be deleted.

My question is - how would this be possible? Of course the SpeechRecognition that is included with android itself would be preferable, but it definitely will be a hassle because it is not even designed to work for extended periods.

like image 568
Matt Smith Avatar asked Aug 06 '13 22:08

Matt Smith


People also ask

What are the two types of speech recognition?

There are two types of speech recognition. One is called speaker–dependent and the other is speaker–independent. Speaker–dependent software is commonly used for dictation software, while speaker–independent software is more commonly found in telephone applications.

What are the techniques for speech recognition?

SUMMARY. Speech recognition involves three processes: extraction of acoustic indices from the speech signal, estimation of the probability that the observed index string was caused by a hypothesized utterance segment, and determination of the recognized utterance via a search among hypothesized alternatives.

How can I make my speech recognition more accurate?

Use high-quality headset microphone Using a high-quality headset microphone is one of the most important factors to improve voice recognition. It is because these are not only capable of catching the right words, but also have the ability to hold a microphone in front of your mouth at a consistent position directly.

What is a continuous speech recognition?

Continuous speech recognition systems allow the user to talk to the system without stops and pauses. Continuous speech recognition systems can recognize more utterances than a command-and-control system. The guidelines for continuous speech recognition differ somewhat from those for command-and-control.


2 Answers

from my research, there is no way to do this using the standard google voice recognition server. They way it works is once sound/word is recognized, the recognizer returns a list of what it thinks it heard with an associated confidence score.

to do what you are asking, you would:

  1. have to keep re-activating the recognition service every time it fired a recognition event, until it matches the word you want.

  2. your app would have to 'keep-awake' the recognition service. you could do this by creating a service that periodically wakes up your handset and resuming the service/activity.

I would not recommend either of these options considering that the battery life is really reduces by the voice recognition service being constantly on.

like image 131
droideckar Avatar answered Oct 20 '22 19:10

droideckar


Unfortunately, I do not think there are any native Android APIs that will fully suit your needs. I would recommend checking out pocketsphinx. It is a pretty robust speaker-independent speech recognition API from CMU that is more intended for tasks such as this. You can also check out a tutorial for getting started here.

like image 44
Grant P Avatar answered Oct 20 '22 19:10

Grant P