vosk-api
vosk-api copied to clipboard
Support for android 4.4.4 (kitkat)
Hey guys! i was wondering if this library would still work on sdk levels below 21 (like 19).
EDIT: also if you know other libraries that have support for android kitkat and are open source let me know!
Thanks :)
There should be no problem to lower the requirements, I don't remember what was the issue. Probably a gradle plugin version or something minor. Or maybe ndk didn't support some function.
You can try to lower the requirement and build the plugin, hopefully it will work, otherwise we can fix it.
Hello! I tried this on my kitkat device and I got the following error:
dlopen("/data/app-lib/org.vosk.demo-2/libvosk.so") failed: dlopen failed: cannot locate symbol "rand" referenced by "libvosk.so"...
can you help me?
EDIT: i found this, it might help: https://github.com/android/ndk/issues/844
Hm, yeah, following https://stackoverflow.com/questions/27091001/how-to-use-mkfifo-using-androids-ndk/27093163#27093163 seems like there are troubles. One has to compile a separate version. I might look on this some time later, not sure about deadline though.
Okay, let me know if there is anything i could help!
Any updates on this? @nshmyrev
It is not going to be fast, maybe couple months ;)
Hello, I am also interested in this. Hopefully it can be built also on at least MinSDK 18
@leonilocarandang I hope that too!
Did anyone get it working? Seems like even when compiling with API Target 19, it still fails for me, even when fixing/removing rand_r, its still not finding the symbol "signal" when running on android 4.4. I guess its just not working for such an old android version.
You can remove that signal stuff from sources probably.
We can compile for older android, it just takes effort on our side.
Well, i will give that a try, I just did't want to start ripping stuff out until it "works". I don't know how much I will have to remove for that.
@leonilocarandang I hope that too!
@nshmyrev , Is the way to build for older android the one described in this section "Compilation from source" in this link https://alphacephei.com/vosk/install ? I would like to try it although I am new to building libraries such as SO
@leonilocarandang I suggest you to go ahead and try! If you have any questions just ask.
Visual Studio terminal, Windows Powershell
You need Linux, it is not going to work on Windows.
Visual Studio terminal, Windows Powershell
You need Linux, it is not going to work on Windows.
@nshmyrev , yes I realized that. I installed Git Bash and was able to run the bash file inside lib folder. But it did not create .so files. I do not know how to attach file here but here are some of the errors **build-vosk.sh: line 119: make: command not found
- cd /c/vosk-api/android/lib/build/kaldi_x86/kaldi/src**
- cp /c/vosk-api/android/lib/build/kaldi_x86/vosk/libvosk.so /c/vosk-api/android/lib/build/kaldi_x86/../../src/main/jniLibs/x86/libvosk.so cp: cannot stat '/c/vosk-api/android/lib/build/kaldi_x86/vosk/libvosk.so': No such file or directory
Does these errors mean, I need to run this in Linux env? Or I just need to install something in Windows env?
You need Linux
So, i tried using different NDKs to try to compile it for API Level 19 and lower. It still is showing me the "symbol 'signal' not found" error. So i guess, it's somehow still not really the correct API-Level. At this point, i dont know what else to try and where to properly set the Target API Level. I dont really know how the whole compile process is working, never really used the NDK before. So any tips would be appreciated. :)
EDIT: I was using the build-vosk.sh file to generate the .so
You need to edit source code to bypass that part that uses signal method
I was able to install the demo on JellyBean 4.0 & 4.3. VoskActivity shows up without error but once it finished transferring the language Model files to Android/data, it throws the attached errors: Vosk-android-.txt
Did anyone get it working? Seems like even when compiling with API Target 19, it still fails for me, even when fixing/removing rand_r, its still not finding the symbol "signal" when running on android 4.4. I guess its just not working for such an old android version.
I also encountered this problem. But I don't know how to solve it. I can't find where I used it.