Comments (20)
@ismtlee This toast is not generated by Kõnele, but by an external app that one can (optionally) use via Kõnele. It is not possible to suppress toasts generated by external apps, unless of course they offer an API for doing so.
from k6nele.
Comment #1 originally posted by Kaljurand on 2014-11-19T23:13:48.000Z:
v0.8.44 supports audio/wav
from k6nele.
Comment #2 originally posted by Kaljurand on 2014-12-10T11:52:29.000Z:
Please provide the support of these extras!
from k6nele.
Comment #3 originally posted by Kaljurand on 2014-12-10T12:39:44.000Z:
Hey...are you able to save the wav formatted audio? if yes then how?
from k6nele.
Comment #4 originally posted by Kaljurand on 2014-12-10T13:58:41.000Z:
@pavan.kirusa
See this Stackoverflow answer for how to get the audio data out of the result intent: http://stackoverflow.com/a/24404235/12547
from k6nele.
Comment #5 originally posted by Kaljurand on 2014-12-10T14:04:03.000Z:
Using that code my demo app is not launching the Google search's microphone prompt
from k6nele.
Comment #6 originally posted by Kaljurand on 2014-12-10T14:05:36.000Z:
I was trying same code but by putting these extras my demo app is not even launching the Google search's microphone prompt. Does it need any kind of permissions apart from Record Audio...?
from k6nele.
Comment #7 originally posted by Kaljurand on 2014-12-10T14:20:01.000Z:
Thanks man I'm able to receive the AMR format..but as you have mentioned above about the audio/wav format....I'm trying that and its not working
from k6nele.
Comment #8 originally posted by Kaljurand on 2014-12-10T14:21:30.000Z:
Thanks man I'm able to receive the AMR format..but as you have mentioned above about the audio/wav format....I'm trying that and its not working..are you able to receive the wav formatted audio?
from k6nele.
Comment #9 originally posted by Kaljurand on 2014-12-10T19:01:30.000Z:
@pavan.kirusa Currently, Kõnele does not return AMR, but WAV. If your question is not about Kõnele, then please use another forum. If it is then please post the code that is not working, and I can take a closer look.
from k6nele.
Comment #10 originally posted by Kaljurand on 2014-12-11T09:04:22.000Z:
I'm running the code you suggested through the stackoverflow answer using Konele as the input for voice with only one change AMR to WAV
from k6nele.
Comment #11 originally posted by Kaljurand on 2014-12-13T23:47:54.000Z:
@pavan.kirusa
See the ExtrasDemo in the Kõnele settings, and the corresponding source code. It gets the audio URI by calling getData() on the resulting intent. You just have to save the data referenced by this URI.
from k6nele.
Hello,
I used SpeechRecognizer to not show Google microphone but i can't get audio record. I try many methods to capture audio but all of them are not successful.
So, How I can get result text and audio without show Google microphone?
Thanks!
from k6nele.
@tungdsv can you post some code to add more detail to your question?
from k6nele.
@Kaljurand
My goal is capture audio and text from speech to text but not show Google microphone popup.
This is my code using SpeechRecognizer.
private void onRecordAudioPermissionGranted(Context context) {
try {
intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, language);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, language);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, language);
intent.putExtra(RecognizerIntent.EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE, language);
intent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true); // For streaming result
intent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS, timeout);
intent.putExtra("android.speech.extra.GET_AUDIO_FORMAT", "audio/AMR");
intent.putExtra("android.speech.extra.GET_AUDIO", true);
recognizer = SpeechRecognizer.createSpeechRecognizer(context);
recognizer.setRecognitionListener(this);
recognizer.startListening(intent);
} catch (Exception exc) {
if (mSpeechCallback != null) {
mSpeechCallback.onError(exc.getMessage());
}
}
}
And this above code I can't get audio from RecognitionListener.
After, I use MediaRecorder or AudioRecord to record audio when startlistenning(). However, whenever start recording, SpeechRecogziner immediately return result is empty and finish listenning.
I tried using SpeechReconginze in activity and recorder in thread or service but same result. Then using SpeechRecognize in thread or service and Recorder in activity but same result.
If i use the below code, i can capture text and audio from OnAcitivtyResult but it show Google Microphone popup:
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getPackageName());
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, language);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, language);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, language);
intent.putExtra(RecognizerIntent.EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE, language);
intent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true); // For streaming result
intent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS, timeout);
intent.putExtra("android.speech.extra.GET_AUDIO_FORMAT", "audio/AMR");
intent.putExtra("android.speech.extra.GET_AUDIO", true);
try {
startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);
} catch (ActivityNotFoundException a) {
Toast.makeText(getApplicationContext(),
getString(R.string.speech_not_supported),
Toast.LENGTH_SHORT).show();
}
But this is not my goal.
Could you help me or suggest for me a solution?
Thank you!
from k6nele.
@tungdsv I don't know how the Google service returns audio. This is out of the scope of the Kõnele project. You should ask Google.
from k6nele.
@Kaljurand
Thank you!
So, the Kõnele project allow capture audio and text from speech to text?
from k6nele.
@tungdsv Kõnele can be used as a front-end to 3rd party speech-to-text services. It depends on these services if they return the audio as well, or just text. However, Kõnele also comes with its own services ("grammar support" and "fast recognition"), and they return the audio (as wav), try it out in "Developer settings ... -> Extras demo". (This issue is about adding AMR support.)
from k6nele.
@Kaljurand
I download project and run app. In extra demo, in chat demo, I see when speech to text no dialog shown.
My question is I can get audio (wav) in chat demo?
If can, how i can capture audio?
Thanks!
from k6nele.
You would need to implement the onBufferReceived-callback and hope that the service fills the buffer with the actual audio:
@Override
public void onBufferReceived(byte[] buffer) {
// save the buffer for later
}
See e.g.
from k6nele.
Related Issues (20)
- Dynamically Enable/Disable Rewrite Rules via Buttons HOT 3
- Remove need for QUERY_ALL_PACKAGES
- Mic icon goes black, no speech transcribed, no errors HOT 3
- Material design 3 HOT 1
- If Kõnele is launched through AnySoftKeyboard dictation, it opens a web search instead of inputting text HOT 3
- Other similar projects to collaborate with.
- New way to select and configure services
- konele's text doesn't stay in input box after MIUI 14 update HOT 8
- Recognition mostly fails with "general app error" / "not connected to the recognition service" (error 5) in recent Android v14 updates
- F-Droid can't build HOT 9
- [FR] Web Speech API HOT 1
- android 11 insufficient permissions HOT 11
- Screenshots for F-Droid HOT 1
- Fail to compile the source code, too many errors, please fix them. HOT 1
- Checkbox does not disable after on-screen rotation. HOT 2
- Microphone stays active after using Kõnele in Android 12 HOT 1
- Build error HOT 1
- Android TV 13: RecognitionService: caller doesn't have permission:android.permission.RECORD_AUDIO HOT 15
- Searching recognition results via launcher icon fails on Android 13 HOT 2
- Temporarily disabling "Microphone access" centrally breaks access to Kõnele services HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k6nele.