1

I am looking each and everywhere on Web for getting URI of audio file from RecognitionListener, Using listener I am getting text what i speak as an output. But I am not able to get URI of audio. I have not found any other link rather than this - HERE which is still unanswered. If anyone knows how to achieve this?

@Override
    public void onResults(Bundle results) {
        Log.i("Voice Recognition", "onResults");
        ArrayList<String> matches = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
        txtOutput.setText(matches.get(0));
    }
Community
  • 1
  • 1
Gulnaz Ghanchi
  • 485
  • 3
  • 14

1 Answers1

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(); }}
karan
  • 3,319
  • 1
  • 35
  • 44
Ali Obeid
  • 11
  • 2
  • 1
    I know this way. But this solution will Show Google Default Dialog like "speak now". I don't want to show that dialog on my screen. – Gulnaz Ghanchi Aug 30 '16 at 10:44