k2-fsa / sherpa-ncnn

Real-time speech recognition and voice activity detection (VAD) using next-gen Kaldi with ncnn without Internet connection. Support iOS, Android, Linux, macOS, Windows, Raspberry Pi, VisionFive2, LicheePi4A etc.
https://k2-fsa.github.io/sherpa/ncnn/index.html
Apache License 2.0
1.08k stars 160 forks source link

android 设备 使用了编译好的so 和预训练模型,报错No implementation found for long com.k2fsa.sherpa.ncnn.SherpaNcnn #331

Closed Nuno980627 closed 8 months ago

Nuno980627 commented 8 months ago

使用了 apk解压提取出来的so文件和预训练模型 如下图 image

但是android 端程序报错

ATAL EXCEPTION: main Process: com.k2fsa.sherpa.ncnn, PID: 20311 java.lang.UnsatisfiedLinkError: No implementation found for long com.k2fsa.sherpa.ncnn.SherpaNcnn.newFromFile(com.k2fsa.sherpa.ncnn.RecognizerConfig) (tried Java_com_k2fsa_sherpa_ncnn_SherpaNcnn_newFromFile and Java_com_k2fsa_sherpa_ncnn_SherpaNcnn_newFromFile__Lcom_k2fsa_sherpa_ncnn_RecognizerConfig_2) at com.k2fsa.sherpa.ncnn.SherpaNcnn.newFromFile(Native Method) at com.k2fsa.sherpa.ncnn.SherpaNcnn.(SherpaNcnn.kt:50) at com.k2fsa.sherpa.ncnn.MainActivity.initModel(MainActivity.kt:203) at com.k2fsa.sherpa.ncnn.MainActivity.onCreate(MainActivity.kt:74) at android.app.Activity.performCreate(Activity.java:8100) at android.app.Activity.performCreate(Activity.java:8080) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1342) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3689) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3865) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2254) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7911) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1009) 界面白屏,求帮助

csukuangfj commented 8 months ago

微信群已回复。解决方法是,下载最新的apk