簡體   English   中英

如何從android中的RecognitionListener接口的onResults方法獲取音頻URI?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM