mirror of
https://github.com/mozilla/DeepSpeech.git
synced 2025-10-26 11:19:39 +00:00
| .. | ||
| .idea | ||
| app | ||
| gradle/wrapper | ||
| jni | ||
| .gitignore | ||
| build.gradle | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| Makefile | ||
| README.md | ||
| settings.gradle | ||
DeepSpeech Java / Android bindings
This is still preliminary work. Please refer to native_client/README.md for
building libdeepspeech.so and deepspeech binary for Android on ARMv7 and
ARM64 arch.
Running deepspeech via adb
You should use adb push to send data to device, please refer to Android
documentation on how to use that.
Please push DeepSpeech data to /sdcard/deepspeech/, including:
output_graph.tflitewhich is the TF Lite modelalphabet.txtlm.binaryandtriefiles, if you want to use the language model ; please be aware that too big language model will make the device run out of memory
Then, push binaries from native_client.tar.xz to /data/local/tmp/ds:
deepspeechlibdeepspeech.solibc++_shared.so
You should then be able to run as usual, using a shell from adb shell:
user@device$ cd /data/local/tmp/ds/
user@device$ LD_LIBRARY_PATH=$(pwd)/ ./deepspeech [...]
Please note that Android linker does not support rpath so you have to set
LD_LIBRARY_PATH. Properly wrapped / packaged bindings does embed the library
at a place the linker knows where to search, so Android apps will be fine.