diff --git a/gearslip/build.gradle.kts b/gearslip/build.gradle.kts index e63bfa1..6222b93 100644 --- a/gearslip/build.gradle.kts +++ b/gearslip/build.gradle.kts @@ -109,11 +109,16 @@ android { } defaultConfig { - // Speech-to-text (sherpa-onnx, in jniLibs) ships for 64-bit ARM only: every phone - // Gearslip runs on, and one copy of the native library instead of four. - ndk { abiFilters += "arm64-v8a" } + // Speech-to-text (sherpa-onnx 1.13.8, static-link-onnxruntime build, in jniLibs) is the + // only native code. One APK for all three, since the updater takes the release's only APK; + // 32-bit x86 is left out, nothing that drives a car runs it. + ndk { abiFilters += listOf("arm64-v8a", "armeabi-v7a", "x86_64") } } + // Compressed, the three copies cost a 33 MB download instead of 75 MB; the phone unpacks + // only its own at install. + packaging { jniLibs { useLegacyPackaging = true } } + testOptions { // GearslipLog calls android.util.Log, which is a stub on the local JVM. unitTests.isReturnDefaultValues = true diff --git a/gearslip/src/main/jniLibs/armeabi-v7a/libsherpa-onnx-jni.so b/gearslip/src/main/jniLibs/armeabi-v7a/libsherpa-onnx-jni.so new file mode 100644 index 0000000..939801b Binary files /dev/null and b/gearslip/src/main/jniLibs/armeabi-v7a/libsherpa-onnx-jni.so differ diff --git a/gearslip/src/main/jniLibs/x86_64/libsherpa-onnx-jni.so b/gearslip/src/main/jniLibs/x86_64/libsherpa-onnx-jni.so new file mode 100644 index 0000000..652a0b1 Binary files /dev/null and b/gearslip/src/main/jniLibs/x86_64/libsherpa-onnx-jni.so differ