开发者社区> 问答> 正文

语音合成TTS给的Android的demo不能用

报错如下,已经在build.gradle加上了
sourceSets {

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

,仍然报错,用都不能用。。。。

08-24 21:37:18.170 4311-4311/com.example.linpc.tts D/SpeechContentValues: Current net type: WIFI.
08-24 21:37:18.194 4311-4311/com.example.linpc.tts E/art: No implementation found for long com.nlspeech.nlscodec.NlsCodec2.createEncoder() (tried Java_com_nlspeech_nlscodec_NlsCodec2_createEncoder and Java_com_nlspeech_nlscodec_NlsCodec2_createEncoder__)
08-24 21:37:18.194 4311-4311/com.example.linpc.tts D/AndroidRuntime: Shutting down VM
08-24 21:37:18.194 4311-4311/com.example.linpc.tts E/AndroidRuntime: FATAL EXCEPTION: main

                                                                 Process: com.example.linpc.tts, PID: 4311
                                                                 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:154)
                                                                     at com.alibaba.idst.nls.NlsClient.newInstance(NlsClient.java:136)
                                                                     at com.example.linpc.tts.MainActivity.onCreate(MainActivity.java:58)
                                                                     at android.app.Activity.performCreate(Activity.java:6303)
                                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2402)
                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)
                                                                     at android.app.ActivityThread.access$1000(ActivityThread.java:153)
                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                     at android.os.Looper.loop(Looper.java:154)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:5528)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:740)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:630)

08-24 21:37:20.181 4311-4311/com.example.linpc.tts I/Process: Sending signal. PID: 4311 SIG: 9

展开
收起
carlpc 2017-08-24 22:19:48 4256 0
3 条回答
写回答
取消 提交回答
  • 请问解决了吗

    2019-07-17 21:31:45
    赞同 展开评论 打赏
  • 手机型号 或 芯片是哪一款呢

    2019-07-17 21:31:45
    赞同 展开评论 打赏
  • 想要改变点什么的程序员。 https://github.com/yi-ge

    我也遇到了同样的问题。

    2019-07-17 21:31:45
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
58同城Android客户端Walle框架演进与实践之路 立即下载
Android组件化实现 立即下载
蚂蚁聚宝Android秒级编译——Freeline 立即下载