Android PocketSphinx Hijacks microphone - android

So I installed Pocketsphinx on my app and the keyword function is working great. I followed this tutorial https://cmusphinx.github.io/wiki/tutorialandroid/ for my setup. The problem I have is that it hijacks the microphone so you can no longer use it for voice to text or anything else as long as it is waiting for the keyword. I know when you use Ok Google you can still use voice to text with it. Would someone be able to point me in a direction of how I can use voice command keywords and still be able to use the microphone for other things?

Related

PocketSphinx for Android conflicts with google speech recognition

I have implemented the pocketsphinx keyword spotting tool in my app and have it running in a sticky service. Keyword spot works great! The problem is that i can no longer use anything related to google speech while it's running (navigation, camera, video, speech to text). Does anybody have any suggestions on how to make them play nicely together?
Or even some kind of receiver for anything related to google speech so that I know to cancel sphinx?
Android to date doesn't provide any way to arbitrate microphone access.
See for details https://code.google.com/p/android/issues/detail?id=61643
You can stop the recognizer in onStop when activity stops.

Voice speech recognition android remove google screen and microphone button

I'm using voice speech recognition from Android API.
I followed successfully this tutorial:
http://code4reference.com/2012/07/tutorial-android-voice-recognition/#comment-335
But I've an unsolved question.
How cain I remove the screen that appear when calling RecognizerIntent??
I'm talking about removing google and microphone button that advice that I'm using speech recognition.
I need to remove this small screen because I need to do other things on screen while that is recognizeing my voice.
You need to write a service class that call createSpeechRecognizer. You can get an idea of how to do it in my answer at Android Speech Recognition as a service on Android 4.1 & 4.2
You'd need to work at a lower level than this example. What this example does is launch an app that does voice recognition for you and sends you the results. That app is drawing the UI, and you can't stop it. What you'd need to do is write an app against the service that actually does the voice recognition (basicly, exactly what that intent is doing). You can probably find an example of this in the Android keyboard code, as they provide a custom UI against Google voice.
You cannot do this. The screen is not displayed by your app, but is displayed by the voice recognition API instead, and you cannot control it.
In any case, that screen is a standard for voice recognition on the device, and users are familiar with it. It would be something of an anti pattern to remove it and conduct voice recognition. With the screen there, users will know that voice recognition is active, and that the microphone is picking up sound as it provides that feedback.
Use SpeechRecognizer. The Intent mechanism is similar.
For convienience use the recognizeDirectly method in this helper class

Voice generating program for my game

I created an android game using gl. I want to create a story mode for the game. In the story mode obviously there is a story.. I don't want to use my voice to narrate the story and the characters' voices and I don't want to get someone speak instead. Is there any program that i can generate voices and use Text-To-Speech or something like that? I don't want the robot voice that people usually use for videos and stuff. I want to actually create the voice and write text that it will read and also to record it. Is there something like that?
Android does have a built-in TTS engine:
http://developer.android.com/resources/articles/tts.html
However, the results probably won't be up to scratch for narration -- machine TTS is still kind of weak, especially if you're trying to convey any emotion. It isn't likely to work as a substitute for real voice actors.

Is it possible to record calls both sides(mic,speaker) in android?

i'm trying to develop an application to record calls bothside(mic and speaker). I've seen there is one app vrecorder providing this vrecorder for android 1.6.
Now i want to do this for android 2.2 and above. Can i know is this possible with MediaRecorder.AudioSource.
I've read some forums they are saying that there are some issues on doing this.
In Stackoverflow itself several questions are about record voice calls saying that not posible. But these posts are older. Is it possible to record phone calls via an Android App? .
But http://code.google.com/p/android/issues/detail?id=2117 in this discussion they are saying that some issues are there but we can implement.
Atlast, please I need some descriptive answers, that can we record voice calls in android both way (from mic and speaker).
Thanks in advance.
Call recording is not yet possible on Android. The feature request you are referencing is still not resolved.
People that have been able to do call recording use rooted phones with custom kernel.
On stock Android phones, you can only record your voice from microphone, but you can not record the sound of the other party. If you only want to record your voice use android.media.MediaRecorder.AudioSource.MIC

Android: Accessing the microphone simultaneously (RecognizerIntent + own app)

my app uses the RecognizerIntent to record the user's voice and doing some speech recognition.
Now, I'd like to compare the results to some open source speech recognition engines. Most of them take an audio file as input. My thought was, to capture the sound from the Android's microphone, and start the RecognizerIntent at the same time. But it seems, that accessing the microphone is exclusive.
Is it possible to use the RecognizerIntent with a recorded audio stream?
Is it possible to access the microphone simultaneously with two Activites?
I have tried to find a solution to the same problem and have not had success. One other approach we explored was to access the web service that Google uses for recognition. I posted a question at Google's voice search speech recognition service, but it still goes unanswered.
There was a good post at Voice recognition on android with recorded sound clip? that dealt with this question and I believe the answer came from a Google employee.
Unfortunately the answer to both of your questions is no, but there are plans to extend this for Gingerbread and 3.0: http://www.mobiclue.com/android-3-0-gingerbread-features-supported-phones.html
I know for sure that is possible to use RecognizerIntent and save the audio, the question is how?
You can see in Google Keep Android applications doing it once you click in the microphone.

Categories

Resources