alphacep / alphacep/vosk-android-demo

Runtime error when including vosk AAR

Đang mở
#144 7 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
1.1k
Fork
278
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi
I have slightly modified the vosk library and I need to include the built AAR in to my project. I have copied the file to my lib folder and it my project compiles fine but I am getting this runtime error

Here is the command I used to build it:
`./gradlew build`

Then I copied this to my project
`vosk-api/android/lib/build/outputs/aar/vosk-android-release.aar`

Here is the runtime error. Many thanks
```

(standard input):906:May 18 09:55:48 05-18 09:55:48.570 11584 11584 D app.testdirect.testdirecthub2.MainActivitytest Voice vosk kaldi: getting model
(standard input)-907-May 18 09:55:48 05-18 09:55:48.591 11584 11584 D AndroidRuntime: Shutting down VM
(standard input)-908-May 18 09:55:48 --------- beginning of crash
(standard input)-909-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: FATAL EXCEPTION: main
(standard input):910:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: Process: app.testdirect.testdirecthub2, PID: 11584
(standard input):911:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: java.lang.UnsatisfiedLinkError: Unable to load library 'vosk':
(standard input):912:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: dlopen failed: library "libvosk.so" not found
(standard input):913:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: dlopen failed: library "libvosk.so" not found
(standard input):914:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/app.testdirect.testdirecthub2-6SeUXkg6AM-7ZIPFzVOU1A==/base.apk"],nativeLibraryDirectories=[/data/app/app.testdirect.testdirecthub2-6SeUXkg6AM-7ZIPFzVOU1A==/lib/x86, /data/app/app.testdirect.testdirecthub2-6SeUXkg6AM-7ZIPFzVOU1A==/base.apk!/lib/x86, /system/lib]]] couldn't find "libvosk.so"
(standard input):915:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: Native library (android-x86/libvosk.so) not found in resource path (.)
(standard input)-916-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:301)
(standard input)-917-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:461)
(standard input)-918-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at com.sun.jna.Native.register(Native.java:1746)
(standard input):919:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at org.vosk.LibVosk.(LibVosk.java:9)
(standard input):920:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at org.vosk.LibVosk.vosk_model_new(Native Method)
(standard input):921:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at org.vosk.Model.(Model.java:10)
(standard input):922:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at app.testdirect.testdirecthub2.voice.MyVoiceModule$2.run(MyVoiceModule.java:150)
(standard input)-923-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873)
(standard input)-924-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
(standard input)-925-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193)
(standard input)-926-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6669)
(standard input)-927-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
(standard input)-928-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
(standard input)-929-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
(standard input):930:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: Suppressed: java.lang.UnsatisfiedLinkError: dlopen failed: library "libvosk.so" not found
(standard input)-931-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at com.sun.jna.Native.open(Native Method)
(standard input)-932-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:191)
(standard input)-933-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: ... 13 more
(standard input):934:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: Suppressed: java.lang.UnsatisfiedLinkError: dlopen failed: library "libvosk.so" not found
(standard input)-935-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at com.sun.jna.Native.open(Native Method)
(standard input)-936-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:204)
(standard input)-937-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: ... 13 more
(standard input):938:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: Suppressed: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/app.testdirect.testdirecthub2-6SeUXkg6AM-7ZIPFzVOU1A==/base.apk"],nativeLibraryDirectories=[/data/app/app.testdirect.testdirecthub2-6SeUXkg6AM-7ZIPFzVOU1A==/lib/x86, /data/app/app.testdirect.testdirecthub2-6SeUXkg6AM-7ZIPFzVOU1A==/base.apk!/lib/x86, /system/lib]]] couldn't find "libvosk.so"
(standard input)-939-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1012)
(standard input)-940-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1669)
(standard input)-941-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:218)
(standard input)-942-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: ... 13 more
(standard input):943:May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: Suppressed: java.io.IOException: Native library (android-x86/libvosk.so) not found in resource path (.)
(standard input)-944-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at com.sun.jna.Native.extractFromResourcePath(Native.java:1119)
(standard input)-945-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:275)
(standard input)-946-May 18 09:55:48 05-18 09:55:48.595 11584 11584 E AndroidRuntime: ... 13 more
(standard input):947:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : ACRA caught a UnsatisfiedLinkError for app.testdirect.testdirecthub2
(standard input):948:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : java.lang.UnsatisfiedLinkError: Unable to load library 'vosk':
(standard input):949:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : dlopen failed: library "libvosk.so" not found
(standard input):950:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : dlopen failed: library "libvosk.so" not found
(standard input):951:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/app.testdirect.testdirecthub2-6SeUXkg6AM-7ZIPFzVOU1A==/base.apk"],nativeLibraryDirectories=[/data/app/app.testdirect.testdirecthub2-6SeUXkg6AM-7ZIPFzVOU1A==/lib/x86, /data/app/app.testdirect.testdirecthub2-6SeUXkg6AM-7ZIPFzVOU1A==/base.apk!/lib/x86, /system/lib]]] couldn't find "libvosk.so"
(standard input):952:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : Native library (android-x86/libvosk.so) not found in resource path (.)
(standard input)-953-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:301)
(standard input)-954-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:461)
(standard input)-955-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at com.sun.jna.Native.register(Native.java:1746)
(standard input):956:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at org.vosk.LibVosk.(LibVosk.java:9)
(standard input):957:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at org.vosk.LibVosk.vosk_model_new(Native Method)
(standard input):958:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at org.vosk.Model.(Model.java:10)
(standard input):959:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at app.testdirect.testdirecthub2.voice.MyVoiceModule$2.run(MyVoiceModule.java:150)
(standard input)-960-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at android.os.Handler.handleCallback(Handler.java:873)
(standard input)-961-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at android.os.Handler.dispatchMessage(Handler.java:99)
(standard input)-962-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at android.os.Looper.loop(Looper.java:193)
(standard input)-963-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at android.app.ActivityThread.main(ActivityThread.java:6669)
(standard input)-964-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at java.lang.reflect.Method.invoke(Native Method)
(standard input)-965-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
(standard input)-966-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
(standard input):967:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : Suppressed: java.lang.UnsatisfiedLinkError: dlopen failed: library "libvosk.so" not found
(standard input)-968-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at com.sun.jna.Native.open(Native Method)
(standard input)-969-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:191)
(standard input)-970-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : ... 13 more
(standard input):971:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : Suppressed: java.lang.UnsatisfiedLinkError: dlopen failed: library "libvosk.so" not found
(standard input)-972-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at com.sun.jna.Native.open(Native Method)
(standard input)-973-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:204)
(standard input)-974-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : ... 13 more
(standard input):975:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : Suppressed: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/app.testdirect.testdirecthub2-6SeUXkg6AM-7ZIPFzVOU1A==/base.apk"],nativeLibraryDirectories=[/data/app/app.testdirect.testdirecthub2-6SeUXkg6AM-7ZIPFzVOU1A==/lib/x86, /data/app/app.testdirect.testdirecthub2-6SeUXkg6AM-7ZIPFzVOU1A==/base.apk!/lib/x86, /system/lib]]] couldn't find "libvosk.so"
(standard input)-976-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at java.lang.Runtime.loadLibrary0(Runtime.java:1012)
(standard input)-977-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at java.lang.System.loadLibrary(System.java:1669)
(standard input)-978-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:218)
(standard input)-979-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : ... 13 more
(standard input):980:May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : Suppressed: java.io.IOException: Native library (android-x86/libvosk.so) not found in resource path (.)
(standard input)-981-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at com.sun.jna.Native.extractFromResourcePath(Native.java:1119)
(standard input)-982-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:275)
(standard input)-983-May 18 09:55:48 05-18 09:55:48.597 11584 11584 E ACRA : ... 13 more
(
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.