Android Speech Recognition API on pre-recorded audio? - android

I know I can use the Android SpeechRecognizer API for speech recognition, but that API is meant for pressing a button, saying something, and then having it spit the text out. I'm wondering if there's a way to use a pre-recorded file (3gp) on the device and run that through some built-in library. All of my searches have only brought up the SpeechRecognizer, which can't use audio files.

As I have found, it isn't possible with android's API, but there may be a way around it.
Try this url.
EDIT:
I haven't tested it myself, it doesn't really look like it's supported, but check the link I guess.
I hope this helps!

Related

How to check wether Speech Recognition is Available or not?

When I am initializing a Speech recognition app, I use this line of code:
Boolean b=SpeechRecognizer.isRecognitionAvailable(cContext);
Why does b always equals false on some devices (the emulator for example)?
I understand what the function does from its description on Android documentation, but the documentation does not say what to do to make voice recognition available.
Do I have to setup something else on my emulator?
Do you know how to make Speech recognition always available?
The problem IS real, so don't downvote before knowing. I solved it myself. The ultimate solution is to verify programmatically, that Google Search app is INSTALLED and ENABLED. If not, the best practice is to use intents to take the user to the Play Store for download/update, or to the App Info screen within settings to enable it. I did it, and it worked, if you need the code just let me know.

Pocketsphinx VS Google Speech Recognition API

I am building a speech recognition android app that will act as a virtual personal assistant with tasks such as:
Make appointments/Reminders
Weather Info
General queries to Wolfram|Alpha / Wikipedia - (i.e Who directed Ghostbusters, whats the £-$ Exchange rate)
My question is wheather to use Pocketsphinx or the Google API?
Originally I set this up with "android.speech.RecognitionListener", worked great, however I want to implement Keyword spotting so the user doesn't need to have any interaction other than just speaking.
Apparently Google API doesn't support this, so I looked into using pocketsphinx for this, and still using google for the rest of the app (As I heard pocketsphinx is not as accurate?)
However the two don't get along as they can't both occupy the microphone at the same time.
Is there a nice way to switch between recognizers? (cant even import both to same project)
Should I just go with pocketshinx and deal with the lower accuracy?
Suggestions would be helpful
Cheers
For anybody who wants to implement a similar project, I have found a work around. It's abit hacky and not entirely clean, but it works.
Using the android speech recognizer with a toggle on/off switch like in many examples across the web, when onResults comes back, the string will be checked for said "hotword", if it is not present, discard the string, if it is, process it. Once the query has been processed and the text to speech is responding, programatically reclick the toggle button, ensuring constant listening.
Do the same on "onError" as well.
I did also have it onPartialResults as well, but it appeared to make the thread crash, not entirely sure why but once it was removed everything seems to work nicely.
You can use pocketsphinx only to recognize predefined set of commands due to really poor accuracy (you should prepare your own dictionary and language model). Also pocketsphinx can be used offline and it is a big cons for some project.
In other hand google is very accurate but it's not free and works only online.

Android Continuous Speech recognition? [duplicate]

I googled around and found the regular speech-api from google. But I think this isn't what I need. I need continious voice recognition and the ability to launch other actions when a specific word is spoken. Is there anything in the android sdk that I can use?
If not: Is it possible to implement third-party libraries? (If yes: which - and what do I have to think about when implement a third-party-library?)
Edit: I thought about this again. I have to recognize just one 'word' (that probably won't be in googles-speech-databases). I have the chance to record it. That means, I'm able to continiously match the incoming audio-stream against my recording. That should work without a database. But I'm new to android-development. Do you have suggestions for APIs to use for recording and matching the recorded? Or is there any better way to continiously wait for a specifig 'word' to occur and then process any further actions?
btw: if that wasn't clear described: the app should continue to record and watch for the word to occure again when the reaction is done.
Is there anything in the android sdk that I can use?
No, sorry.

Continuous Speechrecognition in Android

I googled around and found the regular speech-api from google. But I think this isn't what I need. I need continious voice recognition and the ability to launch other actions when a specific word is spoken. Is there anything in the android sdk that I can use?
If not: Is it possible to implement third-party libraries? (If yes: which - and what do I have to think about when implement a third-party-library?)
Edit: I thought about this again. I have to recognize just one 'word' (that probably won't be in googles-speech-databases). I have the chance to record it. That means, I'm able to continiously match the incoming audio-stream against my recording. That should work without a database. But I'm new to android-development. Do you have suggestions for APIs to use for recording and matching the recorded? Or is there any better way to continiously wait for a specifig 'word' to occur and then process any further actions?
btw: if that wasn't clear described: the app should continue to record and watch for the word to occure again when the reaction is done.
Is there anything in the android sdk that I can use?
No, sorry.

How to record call in android? Is it possible?

I want to record call from android phone.
I am using android.media.MediaRecorder pckg.
Also used following code:
mrec.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
mrec.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
mrec.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
But I didn't succeed in recording an incoming call.
Can anyone recommend a tested code snippet?
Also,
Is this true?
http://groups.google.com/group/android-developers/browse_thread/thread/c2bc85eb60ae2aa5?pli=1
http://code.google.com/p/android/issues/detail?id=2117#c226
Standard distributions of Android does not support it till now.
You can vote up these if you want:
http://code.google.com/p/android/issues/detail?id=4075
http://code.google.com/p/android/issues/detail?id=2117
It's not a software problem and I don't think the baseband firmware vendors will fix this. Most likely because it's illegal in most western countries to record calls without consent of the other person.

Categories

Resources