i need an example of app launch on particular word. i know this is possible using speech recognition api. I just need a clue to start.
I see other apps are able to establish this.
I did this b4 using android service.i kept a background service working and added a listiner to it and keep checking the tresults if it equals ur voice command.
try to use Android Service which listens to voice + voice to text and you can go through the text and find the check word
Related
Access with voice match in android for security lock
Hello guys I want to make a security lock for android, in which it will be open with some specific keyword. It is similar to latest google assistant and alexa. In alexa if we call Alexa it will popup their
voice recognization activity. Please give me hint to open lock with the help of such same activity in android.
Is it possible to build such application?
if it is possible, please help me.
You could use snowboy library to detect special words and then use a foreground service to listen to the user's voice in lock mode. Although you need to train a word with snowboy panel and use that model in your app. Also, they have some prepared models to test and develope.
I have been searching from last 9 or 10 days but I didn't get lucky enough to get my hands on some understandable code. I want to start my main activity through a trigger word like "ok google" or "open" my application receives the command and then performs some action. How can this be don, please provide a sample code.
Thanks very much in advance.
So you want to have a voice command that can open your when it's not open?
The only way you are allowed to do this is to use Accessibility Service. You will have to create your own service, implement the voice recognition, then user will have to manually turn the service on in their phone and based on the voice command, you can do whatever you want.
Basically:
Step 1) Develop Accessibility service
Step 2) Merge speech recognition with the service. Here is an example of speech recognition.
Step 3) User MUST turn on accessibility service
You are basically trying to creating an App like TalkBack, but only for your own app, which is no easy task. But i'm sure you can figure it out
Hope this helps. Good luck!
I'm making an app that will work with Android Wear,
And I wanted to implement a command into Google's "Ok Google" option.
I saw this page:
http://developer.android.com/training/wearables/apps/voice.html
But it's related only to apps that include Activities in the Android Wear.
I wanted to ask:
Can I add custom commands? I mean, those who does not start with the word "Start"?
Can I add commands that will do another thing than just opening the app? Like running a method?
If it's not the place to ask this, can you give me an email/link to Google Developers help/support? thanks.
For apps that run on the Android Wear Device:
No, the list of system-provided voice actions is fixed (and listed here). You can set your application to be able to respond to them (for example, to take a note), but you cannot add new ones.
Yes. When already inside your app, you you can use startActivityForResult() using the ACTION_RECOGNIZE_SPEECH to get voice input. You could then use the returned string to execute whatever you want.
Meanwhile, if you're just displaying notifications from an Android app running in a handheld, then you cannot presently have voice actions at all (at least in a literal sense). What you may have, though, is a notification action that requests voice input. That input will then be passed as an extra in the Intent that is delivered to the app in the handheld.
I am thinking about making an app that I can use to control my Arduino robot (over bluetooth/wifi) using voice commands. But to make the experience fluid, I will need the Android app speech recognition to be continuously running. If I want the robot to stop, I don't want to press a button, wait for the speech recognition dialog to appear, say my command "STOP", release the button, wait for the parser to parse it, and then send the stop command.
I would rather just have the Speech to Text in continuous listen mode when I am controlling my robot. And when it hears keywords, it sends them.
Can I do this in Android? I did some googling, and I found the recognizer intent, but all of the examples I found use a button trigger and pretty much followed the scenario I described above.
It can be done. Look at this link. It has also some example code :)
You can make it listen and when it speeches you get the word see if it is a keyword and then make the robot do as you want.
http://viralpatel.net/blogs/android-speech-to-text-api/
I want to launch my service with a voice command like the name of the app. Is it possible? Can I listen for such an event?
I don't think it's possible to be listening all the time, but you can do an app or perhaps a widget to use the speech input api and send an intent with the text gathered.
Google has introduced a new voice interaction API you can check that here, http://www.youtube.com/watch?v=OW1A4XFRuyc&list=PLOU2XLYxmsIJDPXCTt5TLDu67271PruEk