![](/img/trans.png)
[英]How to get a high quality recorded audio from RecognitionListener in android SpeechRecognizer?
[英]How can i get audio URI from onResults method of RecognitionListener interface in android?
我正在尋找Web上的每一個地方以獲取來自RecognitionListener的音頻文件的URI,使用監聽器我得到的文字我說的是輸出。 但我無法獲得音頻URI。 我還沒有發現任何其他鏈接,而不是這一點- 這里這仍然是懸而未決。 如果有人知道如何實現這一目標?
@Override public void onResults(Bundle results) { Log.i("Voice Recognition", "onResults"); ArrayList<String> matches = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION); txtOutput.setText(matches.get(0)); }
@Override
protected void onActivityResult(int requestCode, int resuleCode, Intent intent) {
super.onActivityResult(requestCode, resuleCode, intent);
if (resuleCode == Activity.RESULT_OK) {
if (requestCode == INTENT_PICK_AUDIO) {
Uri uri = intent.getData(); }}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.