alphacep / vosk-android-demo

Offline speech recognition for Android with Vosk library.
Apache License 2.0
714 stars 187 forks source link

Decoding audio from input source, not mic in android #170

Open dhruvsangal9 opened 2 years ago

dhruvsangal9 commented 2 years ago

I want to transcribe audio using vosk from the internal audio of the android device. for example, transcribing audio of youtube. But vosk, is decoding only the mic input audio, how can I make changes in the code, so it can do the decoding of the audio stream, or in simple it will do decoding whatever is playing in the device, and not from the mic?

nshmyrev commented 2 years ago

InputStream recognition demonstrated here:

https://github.com/alphacep/vosk-android-demo/blob/b0035656cb39b77318a8c0b75f9ca9ea61b20884/app/src/main/java/org/vosk/demo/VoskActivity.java#L201

dhruvsangal9 commented 2 years ago

thank you for response i am trying but unable to get input using input stream live, can you please give an example not from file but from media stream please