9

I was able to run an example project which uses Android speech to text using this code:

   private void startVoiceRecognitionActivity()
    {
        Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
        intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
        intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Voice recognition Demo...");
        startActivityForResult(intent, REQUEST_CODE);
    }

This works fine, but I was wondering, is it possible to use speech to text with an audio sample (byte array?) instead of recorded voice?

kind regards

Moonlit
  • 5,171
  • 14
  • 57
  • 95
  • possible duplicate of [Voice recognition on android with recorded sound clip?](http://stackoverflow.com/questions/2319735/voice-recognition-on-android-with-recorded-sound-clip) – Nikolay Shmyrev Sep 17 '13 at 13:25
  • please did you get this to successfully work? The methods described below seem to be deprecated and i wanted to know if there is a current way this can be done. – nonybrighto Jun 28 '16 at 14:29
  • @nonybrighto did you figure out a way to do it? i'm stuck on the same problem – confusedstudent Jan 24 '22 at 10:20

1 Answers1

4

Currently Android only supports RecognizerIntent

Have a look at all these questions...

Speech recognition for recorded audio files in .3gp or wav format

Speech to Text from own sound file

Saving audio input of Android Stock speech recognition engine

Voice recognition on android with recorded sound clip?

Community
  • 1
  • 1
Kailash Ahirwar
  • 771
  • 3
  • 14