Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
154 views
in Technique[技术] by (71.8m points)

java - Launch app on voice command (android)

I need an example of how I could launch my app on a voice command (trigger word). So some sort of a service running in the background listening to everything and if the word matches a set textual value (I guess this can be done through Voice Recognition), app will open. I know this is possible, but I've no clue where to start...

I see other apps are able to establish this. I've close to 1 million users and this is one of the most often requested features.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To do this you have to run Android speech recognition as a service instead of as an activity. Then have your service listen for the key word or phrase.

Check out this git for example code on how to run Android speech recognition as a service:

https://github.com/gast-lib/gast-lib/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...