Android, can speech recognizer work during a call? - android

While on a call, does speechRecognizer works?
Has anyone tried it?
My goal is to listen to user's voice and not the incoming voice. While researching I found this link:
can speech recognizer take input from incoming call voice (Speaker)?
which is looking for using SpeechRecognizer for incoming voice 'during a call'.
And am looking for using SpeechRecognizer while on the call, just for my user's voice.

The Internet says YES!
One answer I found in a comment from this question was to use this SDK.

Related

Android Speech Recognition on smartglasses Vuzix M300

We are currently developing an application that needs voice interaction. The app is for the smartglasses Vuzix M300. We have tried their sample app for Speech recognition but it does not work as expected (some words are not always recognized).
After much effort and research, we have been able to install Google app and Google Now launcher to have Google Speech recognition services available in the glasses.
But after developing a very simple application just after calling
speechRecognizer.startListening(speechRecognizerIntent);
we get error "CLIENT_ERROR" on the "onError" event of the speechrecognizer listener.
We have search the whole net searching for this and have debug the application but as the Android SpeechRecognizer when do I get ERROR_CLIENT when starting the voice recognizer? states, there are 7 places where the ERROR_CLIENT is sent to onError but it is not sent from there, it is sent from the InternalListener and internal handler, with the handleMessage beeing MSG_ERROR (all this comes from the SpeechRecognizer.java class from the android.speech package.
So we are stucked and don't know where is this error coming from and why.
I hope anybody can help us.
If you need more information or code of the application (but it is very simple and it seems it has nothing to do with our code) ask for it.
Thanks a lot in advance
Regards.

android - How to detect speech

In android is there a Api i can use to detect when the user speaks into the mic ?
So im expecting there is a voice recognition build into android or some speech to text api i can use to detect someone speaking, any ideas ? Can ACTION_RECOGNIZE_SPEECH help me?
The way it works is you create an Intent with ACTION_RECOGNIZE_SPEECH and call startActivityForResult(). Then in your onActivityResult() override, you can pull the speech-to-text data from the result Intent extras.
Here's a neat tutorial to get you started:
Make your next Android app a good listener -- TechRepublic

Android voice call recorder

Hi all I am looking for any API or lines of codes that can guide me how I can record android incoming and outgoing call ?
I read some discussion from Is there any API supported by Android for recording phone call? and http://code.google.com/p/android/issues/detail?id=2117#c226 where they guide its not possible to record android calls due to device limitations etc.I also explore android auto answer app that's on http://code.google.com/p/auto-answer/ but this app also do auto ans by following different option like ringing call duration etc.any one can guide in detail how i can record twoway voice ?how i can detect it call is answer,reject by caller and receiver person ?thanks

How to automatically answer call and play prerecorded sound out to the caller and DTMF on Android

Could it be possible now, which we can develop an Android application having the following requirement for its working steps
Automatic receive the call, then
Play some sound out to the caller, wait for DTMF response, then
Record the caller sound (in the case that they permit, by pressing 1 as DTMF response)
Callee can play back the recoreded sound later.
Thank for all answers in advance .....
Hey I am also making same application...for Automatic receive call you need to change Source Code of android. I have done it successfully with froyo 2.2. There is method answerCall(Phone phone) in PhoneUtils.java file with that you can automatic receive call.
I am also searching for DTMF....but till now i didn't get anything which can be helpful....for DTMF decoding....
the first point seems possible. check the state of call if it is ringing state the program can auto attend it for you..you can find more information in this link.
http://www.devlper.com/2010/08/detecting-incoming-and-outgoing-calls-in-android/
http://prasanta-paul.blogspot.com/2010/09/call-control-in-android.html

Voice recognition on android with recorded sound clip?

I've used the voice recognition feature on Android and I love it. It's one of my customers' most praised features. However, the format is somewhat restrictive. You have to call the recognizer intent, have it send the recording for transcription to google, and wait for the text back.
Some of my ideas would require recording the audio within my app and then sending the clip to google for transcription.
Is there any way I can send an audio clip to be processed with speech to text?
I got a solution that is working well to have speech recognizing and audio recording. Here is the link to a simple Android project I created to show the solution's working. Also, I put some print screens inside the project to illustrate the app.
I'm gonna try to explain briefly the approach I used. I combined two features in that project: Google Speech API and Flac recording.
Google Speech API is called through HTTP connections. Mike Pultz gives more details about the API:
"(...) the new [Google] API is a full-duplex streaming API. What this means, is that it actually uses two HTTP connections- one POST request to upload the content as a “live” chunked stream, and a second GET request to access the results, which makes much more sense for longer audio samples, or for streaming audio."
However, this API needs to receive a FLAC sound file to work properly. That makes us to go to the second part: Flac recording
I implemented Flac recording in that project through extracting and adapting some pieces of code and libraries from an open source app called AudioBoo. AudioBoo uses native code to record and play flac format.
Thus, it's possible to record a flac sound, send it to Google Speech API, get the text, and play the sound that was just recorded.
The project I created has the basic principles to make it work and can be improved for specific situations. In order to make it work in a different scenario, it's necessary to get a Google Speech API key, which is obtained by being part of Google Chromium-dev group. I left one key in that project just to show it's working, but I'll remove it eventually. If someone needs more information about it, let me know cause I'm not able to put more than 2 links in this post.
Unfortunately not at this time. The only interface currently supported by Android's voice recognition service is the RecognizerIntent, which doesn't allow you to provide your own sound data.
If this is something you'd like to see, file a feature request at http://b.android.com. This is also tangentially related to existing issue 4541.
As far as I know there is still no way to directly send an audio clip to Google for transcription. However, Froyo (API level 8) introduced the SpeechRecognizer class, which provides direct access to the speech recognition service. So, for example, you can start playback of an audio clip and have your Activity start the speech recognizer listening in the background, which will return results after completion to a user-defined listener callback method.
The following sample code should be defined within an Activity since SpeechRecognizer's methods must be run in the main application thread. Also you will need to add the RECORD_AUDIO permission to your AndroidManifest.xml.
boolean available = SpeechRecognizer.isRecognitionAvailable(this);
if (available) {
SpeechRecognizer sr = SpeechRecognizer.createSpeechRecognizer(this);
sr.setRecognitionListener(new RecognitionListener() {
#Override
public void onResults(Bundle results) {
// process results here
}
// define your other overloaded listener methods here
});
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
// the following appears to be a requirement, but can be a "dummy" value
intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, "com.dummy");
// define any other intent extras you want
// start playback of audio clip here
// this will start the speech recognizer service in the background
// without starting a separate activity
sr.startListening(intent);
}
You can also define your own speech recognition service by extending RecognitionService, but that is beyond the scope of this answer :)

Categories

Resources