开发者社区> 问答> 正文

智能语音识别nlu android sdk 集成失败, this.enc = this.codec.createEncoder();

娜可露露酱 2017-07-15 11:10:52 1975

报错语句:
OupsCodec.class里的

this.enc = this.codec.createEncoder();

异常信息为:
java.lang.UnsatisfiedLinkError: No implementation found for long com.nlspeech.nlscodec.NlsCodec2.createEncoder() (tried Java_com_nlspeech_nlscodec_NlsCodec2_createEncoder and Java_com_nlspeech_nlscodec_NlsCodec2_createEncoder__)

                                                            at com.nlspeech.nlscodec.NlsCodec2.createEncoder(Native Method)
                                                            at com.alibaba.idst.nls.internal.codec.OupsCodec.open(OupsCodec.java:123)
                                                            at com.alibaba.idst.nls.internal.VoiceCodecs.open(VoiceCodecs.java:21)
                                                            at com.alibaba.idst.nls.internal.VoiceActDetector.open(VoiceActDetector.java:117)
                                                            at com.alibaba.idst.nls.NlsClient.<init>(NlsClient.java:153)
                                                            at com.alibaba.idst.nls.NlsClient.newInstance(NlsClient.java:135)
                                                            at com.way.test.MainActivity.new_init(MainActivity.java:94)
                                                            at com.way.test.MainActivity.onCreate(MainActivity.java:54)
                                                            at android.app.Activity.performCreate(Activity.java:6910)
                                                            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
                                                            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2746)
                                                            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
                                                            at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
                                                            at android.os.Handler.dispatchMessage(Handler.java:105)
                                                            at android.os.Looper.loop(Looper.java:156)
                                                            at android.app.ActivityThread.main(ActivityThread.java:6585)
                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
分享到
取消 提交回答
全部回答(1)
  • 娜可露露酱
    2019-07-17 21:23:58

    自己以解决,在build.gradle里添加如下代码就好了,之前没有调用.so文件

    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }

    希望能将这个添加入sdk文档中,以免像我这样的新手再遇到这样的问题

    0 0
+ 订阅

了解行业+人工智能最先进的技术和实践,参与行业+人工智能实践项目

推荐文章
相似问题