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.
Related
I'm able to integrate Android widgets with Google Assistant. And want to have some voice command experience.
For example the CREATE_CALL intent, if user is trying to call Alice by saying call Alice with some app, and if there are 2 Alice in my app, is it possible for me to response with a widget showing 2 Alice, and asking user by voice, and user can choose which one to actually call, all by voice? Can it be done by SpeechRecognizer API?
Broadly speaking, App Actions do not have a voice conversation experience. There are some tricks you can pull that might head in that direction, but they are largely outside of the App Action Widget experience itself.
Can I respond with a widget showing that there are multiple matches?
Yes, you can send back a Control Widget that might allow them to choose which user they mean.
Can they speak which user?
Probably not in the way you're thinking. To use your example, they can re-invoke the CREATE_CALL BII using any of the phrases, but you can't prompt them with "Who did you mean, exactly?" and for them to just say the name.
Can I use the SpeechRecognizer API?
Not as part of a widget.
Widgets get embedded in the conversation with the Assistant.
In theory (and this is on my list to eventually test and figure out), you should be able to deep link to an Android Intent in cases such as this and open a view. While there, you could use SpeechRecognizer or just open the microphone to send audio somewhere. But this isn't done using the Widget itself.
In this scenario, SpeechRecognizer just does the Speech To Text (STT) or Automatic Speech Recognition (ASR) part of the processing. To actually match this up to phrases to determine an Intent, you would need a Natural Language Understanding (NLU) module such as Dialogflow. (But you may not need the SpeechRecognizer in that particular case, since Dialogflow can also take an audio stream to do the ASR part for you.)
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
I am a student and i would like to ask if it is possible to develop an app that will take an incoming call through the speech intervention of the user eliminating the use of physical input from the user?
For example using the keywords ("Answer/Reject")
Also what are the starting points to develop this application? Thank you for understanding :)
I'm using code from the following URL in order to get sound data from the microphone with AudioRecord:
http://www.dreamincode.net/forums/topic/303235-visualizing-sound-from-the-microphone/
The problem I'm seeing is that if another app is also using the microphone, I'm getting an error (status -3) from AudioRecord. Everything works as expected if I kill the other app which is using the microphone. Is there an elegant solution to allow my app to access the microphone even if another app is already using it?
Thank you.
Sadly, only one app at a time can access the microphone (just like the camera).
Also, there is no standard way to inform another app that you want access to the microphone (so that they release the resources and let you access it). You could however send a broadcast to all other apps ("requesting the microphone"), but the other apps would have to implement this feature (and very few or zero developers will do this).
I would recommend you to simply inform the user that the microphone is currently not available, because you can't do anything else.
If you are using the "OK Google" function with the option to access it from any page, try turning that off (the 'any page' bit From Google app screen MENU>SETTINGS>VOICE>"OK GOOGLE DETECTION">FROM ANY SCREEN=OFF): it hijacks the microphone, or can do.
I've got an idea for an android app, I want to be able to say commands and have the application listen out for these and perform some action.
For example, I want my app to sit idle and listen for my voice, when it hears me say "start", the app will start doing something until I say "stop".
The idea is to lay the phone down and not have to physically touch it in order to control my app.
Would this be possible with any current APIs? If so which ones should I look into?
You can take a look at the Google voice commands.
http://www.google.com/mobile/voice-actions/
Alternatively, if you want to customise your application, you can use the google voice service and write an activity that will invoke the voice service and return you the result.
Check out the below link for the sample application.
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/VoiceRecognition.html