When I call the startListening
method of a SpeechRecognizer
object, the speech recognizer starts listening for speech. I would like to create a service that is waiting for speech of a specific keyword: when the user says this keyword and the speech recognizer detects this keyword, then the service becomes ready to receive user voice commands.
To this end, after a new SpeechRecognizer
instantiated, I should call its startListening
method: can I keep the speech recognizer listening indefinitely?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…