Menu

Recognition from InputStream with PocketSphinx-Android

Help
Nacho G
2016-01-27
2016-01-27
  • Nacho G

    Nacho G - 2016-01-27

    I have inherited some code from a couple of years back which works with a precompiled instance of PocketSphinx-Android 0.8 and recognizes the audio by calling edu.cmu.pocketsphinx.SpeechRecognizer.startListening(String, InputStream).

    I need to now recompile that code for arm64-v8a, which means recompiling the library. The 5prealpha version has lost that API for what I can see, so I am stuck with 0.8. However, I have been through all the commits in the repo and have not found that API at any point (I'm starting to suspect that whomever developed this code modified PocketSphinx-Android, but cannot be sure).

    There are two questions I have then:

    • If the API was there at some point and not anymore, is there anyway for me to get the source code and recompile it for my new platform?

    • If the API was never official and it was a local modification, how does one recognize audio from other source than the microphone in Android? I have found some short answers for that in two StackOverflow questions, but could not really get how to really do it (how to configure the decoder was missing, as well as how the callbacks can be gotten). Is there any way of providing an InputStream to PocketSphinx-Android 5-prealpha and have an object notified of the callbacks onResult(), onEndOfSpeech(), etc.?

     

    Last edit: Nacho G 2016-01-27
  • Nacho G

    Nacho G - 2016-01-27

    Thank you very much, Nickolay, that should be enough to set me going :)

     

Log in to post a comment.