Are there any alternatives to Android's native speech recognition engine that can be used on-device for an app? I do mean an SDK. But one that can be used on device (offline), as opposed to having to use a cloud based API.

  • Are you looking for an SDK to integrate with an app you write – or for a ready-to-use app which "shares" the recognized text to other apps? – Izzy Jan 24 '17 at 12:57
  • My apologies, I do mean an SDK. But one that can be used on device, as opposed to having to use a cloud based API – ishido Jan 24 '17 at 13:48
  • There's Pocketsphinx. I only know that because we have a similar need for Gadgetbridge, also discussed here, where it was said not to be that useful. – Izzy Jan 24 '17 at 16:05

You can use Mozilla's DeepSpeech. Some people have reported it works on Android:


My company develops SDKs for on-device speech recognition for iOS and Android devices.


We have trial SDKs and couple of PoC apps on Github that you can use to evaluate the SDK. I recommend you review general overview pages at https://keenresearch.com/keenasr-docs and then Android-related pages.


You could use Termux-DeepSpeech and configure Android to use that instead of the "OK Google" voice assistant. It's offline and open source since it's based on Mozilla's DeepSpeech.

Do note however, that you have to define the voice commands yourself. For example:

WORDS="$(speech2text)"                        # This will listen to the microphone for (by default) 2 seoncds and the write what you said in the variable WORDS

if [[ "$WORDS" == "light" ]]; then            # If you said the word "light"
    termux-tts-speak "Turning flashlight on"  # Let a robot voice say "Turning flashlight on"
    termux-torch on                           # Turn the flashlight on

You can use Vosk, an open source speech recognition engine.

Android demo is here.

  1. Supports 9 languages - English, German, French, Spanish, Portuguese, Chinese, Russian, Turkish, Vietnamese. More to come.
  2. Works offline, even on lightweight devices - Raspberry Pi, Android, iOS Installs with simple pip3 install vosk
  3. Portable per-language models are only 50Mb each, but there are much bigger server models available.
  4. Provides streaming API for the best user experience (unlike popular speech-recognition python packages)
  5. There are bindings for different programming languages, too - java/csharp/javascript etc.
  6. Allows quick reconfiguration of vocabulary for best accuracy.
  7. Supports speaker identification beside simple speech recognition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.