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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
InputStreamto PocketSphinx-Android 5-prealpha and have an object notified of the callbacksonResult(),onEndOfSpeech(), etc.?Last edit: Nacho G 2016-01-27
This was an external API I believe, it was never a part of our implementation. We plan to implement something like that as described here:
https://sourceforge.net/p/cmusphinx/bugs/449/
but havent' find the time to do it yet. The impelmentation would be actually pretty simple, on the lower level it should look like this:
http://stackoverflow.com/questions/29008111/give-a-file-as-input-to-pocketsphinx-on-android
Thank you very much, Nickolay, that should be enough to set me going :)