I want to add voice control to my Open Source Android app.

The vocabulary I need is not big, just 5 simple commands: "Show", "Again", "Hard", "Good", "Easy".

What library can I use for this?


  • Fast recognition, less than half a second
  • Must be Open source
  • It must NOT rely on non-open libraries like Google Play Services or others
  • Preferably not too big
  • Not that I have something in mind (I'm not an Android dev ;) – but: should it work offline, and not using the (proprietary) Google-Services (or any other cloudy stuff)? If that's the case, don't forget to update us with details once it's finished, as "Google listening" and "network required" are my main arguments against using such things :)
    – Izzy
    Nov 11, 2014 at 7:12
  • @Izzy: Updated. My app is heavily used in China where most phones don't have Google Play Services.
    – Nicolas Raoul
    Nov 11, 2014 at 7:50
  • Thanks, Nicolas! That makes me even the more curious, as voice-control without that would be something I'm really interested in (upvoted, starred ;)
    – Izzy
    Nov 11, 2014 at 9:20

2 Answers 2


So the only library I have heard of that might work is Pocket Sphinx

I have only used the desktop version Sphinx but I believe it could do what you need. You would have to create your own Grammar file but I would guess it would be pretty easy based on your short list of required words.

The license looks similar to the BSD license.

  • By about how much do you think my APK will grow after adding all necessary libraries and the recognition data for the 5 simple voice commands of the question? Thanks!
    – Nicolas Raoul
    Jan 10, 2018 at 2:48

You can try Pocketsphinx to create offline speech recognition.
But you can try this library for easy use without dealing with Pocketsphinx assets and configuration RapidSphinx. That's library can build dictionary and language model (Arpa File) on the fly.

  • By how much will my APK grow after adding all necessary libraries?
    – Nicolas Raoul
    Jan 9, 2018 at 14:47
  • I'm glad can help you. The largest file from the library is dictionary file, it's about 3,2 Mb and the total of my library with codes is about 3.5 Mb. It's standard size from the Pocketsphinx. And also only one audio record will be created from this library so if you try to record again, the old audio record will be replaced. So no worry. Please let I know if you need the new feature from this library with creating an issue in GitHub.
    – icaksama
    Jan 9, 2018 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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