离线语音识别提示网络不稳定
王奇ljj 发布于2017-03 浏览:2145 回复:1
0
收藏

我使用的服务是:语音识别

调用的接口是:

参数设置情况:

开发平台和机型:

SDK版本号:2.1.21

代码或日志截图(上传截图能帮助您更快解决问题):

复现步骤、现象及其他描述:




前几条是我测试打印的log,显示参数配置及文件是否存在。让我参照你们DEMO,可是你们DEMO也是这让的效果啊。官方文档能不能完善下啊
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_INFILE 
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_GRAMMAR  /storage/emulated/0/baiduSpeech/baidu_speech_grammar.bsg   true
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_SAMPLE  16000
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_LANGUAGE  cmn-Hans-CN
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_NLU 
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_VAD  input
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_PROP  20000
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_OFFLINE_ASR_BASE_FILE_PATH/storage/emulated/0/baiduSpeech/s_1   true
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_OFFLINE_LM_RES_FILE_PATH/storage/emulated/0/baiduSpeech/s_2_InputMethod   true
03-16 16:50:53.692 26315-26892/com.cloudminds.baiduspeech E/AudioRecord-JNI: android_media_AudioRecord_start
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err: java.net.UnknownHostException: Unable to resolve host "vop.baidu.com": No address associated with hostname
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.net.InetAddress.lookupHostByName(InetAddress.java:424)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.net.InetAddress.getByName(InetAddress.java:289)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at com.baidu.speech.EventManagerDec$1.run(EventManagerDec.java:450)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.lang.Thread.run(Thread.java:841)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err: Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at libcore.io.Posix.getaddrinfo(Native Method)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:61)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:  ... 8 more


收藏
点赞
0
个赞
共1条回复 最后由用户已被禁言回复于2022-04
#2周俊316回复于2017-05

王奇ljj:

我使用的服务是:语音识别

调用的接口是:

参数设置情况:

开发平台和机型:

SDK版本号:2.1.21

代码或日志截图(上传截图能帮助您更快解决问题):

复现步骤、现象及其他描述:




前几条是我测试打印的log,显示参数配置及文件是否存在。让我参照你们DEMO,可是你们DEMO也是这让的效果啊。官方文档能不能完善下啊
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_INFILE 
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_GRAMMAR  /storage/emulated/0/baiduSpeech/baidu_speech_grammar.bsg   true
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_SAMPLE  16000
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_LANGUAGE  cmn-Hans-CN
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_NLU 
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_VAD  input
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_PROP  20000
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_OFFLINE_ASR_BASE_FILE_PATH/storage/emulated/0/baiduSpeech/s_1   true
03-16 16:50:53.242 26315-26315/com.cloudminds.baiduspeech E/Sdk2Api: bindParams: Constant.EXTRA_OFFLINE_LM_RES_FILE_PATH/storage/emulated/0/baiduSpeech/s_2_InputMethod   true
03-16 16:50:53.692 26315-26892/com.cloudminds.baiduspeech E/AudioRecord-JNI: android_media_AudioRecord_start
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err: java.net.UnknownHostException: Unable to resolve host "vop.baidu.com": No address associated with hostname
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.net.InetAddress.lookupHostByName(InetAddress.java:424)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.net.InetAddress.getByName(InetAddress.java:289)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at com.baidu.speech.EventManagerDec$1.run(EventManagerDec.java:450)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.lang.Thread.run(Thread.java:841)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err: Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at libcore.io.Posix.getaddrinfo(Native Method)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:61)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:     at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
03-16 16:50:56.962 26315-31623/com.cloudminds.baiduspeech W/System.err:  ... 8 more


回复王奇ljj:


您先进行授权,请到 http://yuyin.baidu.com/docs/asr/166核对程序中设置和应用是否一致(如api key和sercret key),然后您第一次联网设置授权后,就可以使用服务了


0
TOP
切换版块