离线命令识别 在【路由器无线网络存在,但未外接电信网络】的情况下,仍然优先在线识别,有BUG
石浦雪菜小黄鱼 发布于2017-10 浏览:1751 回复:9
0
收藏

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

下载的SDK版本是:bd_speech_sdk_asr_v3.0.3.20170801_60da871


离线语音识别功能已经从你们提供的DEMO中移到了自己的工程中,没有联上WIFI的时候,离线命令识别速度还算挺快的。则只要几十ms就够了。  


然后联上路由器【该路由器没有接电信网络】,这时候平板显示连上WIFI,但事实上不能上网的

这时候,离线命令识别就会很慢,从日志来看,是先去申请在线语音识别,然后发现网络不通,再转为

离线语音识别,   整个过程,从说出“呼叫赵六”到显示识别成功,耗时【12700ms】。 


我也试了讯飞的SDK,他们的离线命令识别就没有这个问题,【有WIFI,但不能连接外网】的情况下仍然

很快的得出结果。


请教一下,这算不算一个BUG??



日志如下:

10-27 17:26:53.134: I/MyRecognizer.Debug(23970): asr params(反馈请带上此行日志):{"decoder":2}

10-27 17:26:53.140: E/ASREngine(23970): VAD Model=model-vad

10-27 17:26:53.183: W/audioSource :(23970): 1

10-27 17:26:53.197: I/RecogEventAdapter(23970): name:asr.ready; params:null

10-27 17:26:53.197: I/System.out(23970): 引擎就绪,可以开始说话。  ;time=1509096413197

10-27 17:26:53.200: I/AudioRecordPermission(23970): remindWithResult:false

10-27 17:26:53.200: I/HwAudioRecordImpl(23970): checkRecordActive

10-27 17:26:53.215: I/HwAudioRecordImpl(23970): sendStateChangedIntent, state=3

10-27 17:26:53.322: I/MicrophoneServer(23970): audio mills is 0

10-27 17:26:53.364: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":2,"volume":124}

10-27 17:26:53.364: I/StatusRecogListener(23970): 音量百分比2 ; 音量124

10-27 17:26:53.564: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":1,"volume":61}

10-27 17:26:53.564: I/StatusRecogListener(23970): 音量百分比1 ; 音量61

10-27 17:26:53.764: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":49}

10-27 17:26:53.764: I/StatusRecogListener(23970): 音量百分比0 ; 音量49

10-27 17:26:53.964: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":34,"volume":1727}

10-27 17:26:53.964: I/StatusRecogListener(23970): 音量百分比34 ; 音量1727

10-27 17:26:54.163: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":64,"volume":3245}

10-27 17:26:54.163: I/StatusRecogListener(23970): 音量百分比64 ; 音量3245

10-27 17:26:54.369: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":56,"volume":2833}

10-27 17:26:54.369: I/StatusRecogListener(23970): 音量百分比56 ; 音量2833

10-27 17:26:54.372: I/RecogEventAdapter(23970): name:asr.sn; params:{"sn":"cuid=A2F84FB5972FC733006470D7BF256648|84310111871UNFNA&sn=fcf3ee5c-b01f-4020-ab77-e3a8976bce84&nettype=4"}

10-27 17:26:54.372: I/RecogEventAdapter(23970): name:asr.begin; params:null

10-27 17:26:54.372: I/System.out(23970): 检测到用户说话  ;time=1509096414372

10-27 17:26:54.563: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":0}

10-27 17:26:54.563: I/StatusRecogListener(23970): 音量百分比0 ; 音量0

10-27 17:26:54.766: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":0}

10-27 17:26:54.766: I/StatusRecogListener(23970): 音量百分比0 ; 音量0

10-27 17:26:54.964: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":6,"volume":327}

10-27 17:26:54.964: I/StatusRecogListener(23970): 音量百分比6 ; 音量327

10-27 17:26:55.167: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":9}

10-27 17:26:55.167: I/StatusRecogListener(23970): 音量百分比0 ; 音量9

10-27 17:26:55.364: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":9}

10-27 17:26:55.364: I/StatusRecogListener(23970): 音量百分比0 ; 音量9

10-27 17:26:55.568: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":2}

10-27 17:26:55.568: I/StatusRecogListener(23970): 音量百分比0 ; 音量2

10-27 17:26:55.764: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":3}

10-27 17:26:55.764: I/StatusRecogListener(23970): 音量百分比0 ; 音量3

10-27 17:26:55.966: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":3}

10-27 17:26:55.966: I/StatusRecogListener(23970): 音量百分比0 ; 音量3

10-27 17:26:56.124: I/RecogEventAdapter(23970): name:asr.end; params:{"vad_silent_start":"1509096416120"}

10-27 17:26:56.124: I/System.out(23970): 检测到用户说话结束  ;time=1509096416124

10-27 17:26:56.265: I/HwAudioRecordImpl(23970): sendStateChangedIntent, state=1

10-27 17:27:01.184: W/System.err(23970): java.net.SocketException: Socket closed

10-27 17:27:01.184: W/System.err(23970): at java.net.PlainSocketImpl.socketAccept(Native Method)

10-27 17:27:01.184: W/System.err(23970): at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:389)

10-27 17:27:01.184: W/System.err(23970): at java.net.ServerSocket.implAccept(ServerSocket.java:534)

10-27 17:27:01.184: W/System.err(23970): at java.net.ServerSocket.accept(ServerSocket.java:502)

10-27 17:27:01.184: W/System.err(23970): at com.baidu.speech.audio.MicrophoneServer$1.run(Unknown Source)

10-27 17:27:08.819: I/RecogEventAdapter(23970): name:asr.partial; params:{"results_recognition":["呼叫105"],"origin_result":{"content":{"item":["呼叫105"]},"result":{"sn":"KWS","version":"easr.kws.v1","raw_text":"呼叫105","scene_id":0,"score":0.81,"_results":{"name":{"keyword":"105","keyword_nbest":["105"],"score":0.82}}}},"error":0,"best_result":"呼叫105","result_type":"partial_result"}

10-27 17:27:08.820: I/System.out(23970): 临时识别结果,结果是“呼叫105”;原始json:{"results_recognition":["呼叫105"],"origin_result":{"content":{"item":["呼叫105"]},"result":{"sn":"KWS","version":"easr.kws.v1","raw_text":"呼叫105","scene_id":0,"score":0.81,"_results":{"name":{"keyword":"105","keyword_nbest":["105"],"score":0.82}}}},"error":0,"best_result":"呼叫105","result_type":"partial_result"}  ;time=1509096428820

10-27 17:27:08.822: I/RecogEventAdapter(23970): name:asr.partial; params:{"results_recognition":["呼叫105"],"origin_result":{"content":{"item":["呼叫105"]},"result":{"sn":"KWS","version":"easr.kws.v1","raw_text":"呼叫105","scene_id":0,"score":0.81,"_results":{"name":{"keyword":"105","keyword_nbest":["105"],"score":0.82}}}},"error":0,"best_result":"呼叫105","result_type":"final_result"}

10-27 17:27:08.822: I/SendBroadcastPermission(23970): action:com.ifly.asr.result, mPermissionType:0

10-27 17:27:08.824: I/System.out(23970): -->识别结束,结果是”呼叫105”

10-27 17:27:08.824: I/System.out(23970): 识别结束,结果是”呼叫105”“;原始json:{"results_recognition":["呼叫105"],"origin_result":{"content":{"item":["呼叫105"]},"result":{"sn":"KWS","version":"easr.kws.v1","raw_text":"呼叫105","scene_id":0,"score":0.81,"_results":{"name":{"keyword":"105","keyword_nbest":["105"],"score":0.82}}}},"error":0,"best_result":"呼叫105","result_type":"final_result"}

10-27 17:27:08.824: I/System.out(23970): 识别结束,结果是”呼叫105”;说话结束到识别结束耗时【12700ms】

10-27 17:27:08.824: I/RecogEventAdapter(23970): name:asr.finish; params:{"error":0,"origin_result":{"error":"Speech Recognize success.","err_no":0},"desc":"Speech Recognize success."}

10-27 17:27:08.824: I/System.out(23970): 识别一段话结束。如果是长语音的情况会继续识别下段话。


收藏
点赞
0
个赞
共9条回复 最后由用户已被禁言回复于2022-04
#23用户已被禁言回复于2022-04

https://search.bilibili.com/live?keyword=%E6%B5%99%E6%B1%9F%E6%85%88%E6%BA%AA%E7%9C%9F%E4%BA%BA%E6%96%97%E7%89%9B%E5%AE%98%E7%BD%91B2024%C2%B7CN%E9%9B%85%E5%AE%89%E9%93%81%E9%80%9A%EF%BC%98%EF%BC%A1 https://b2b.baidu.com/s?q=%E8%85%BE%E9%BE%99%E5%85%AC%E5%8F%B8%E5%BE%AE%E4%BF%A1%E5%BC%80%E6%88%B7%E7%94%B5%E8%AF%9D%E8%80%81%E8%A1%97%E8%85%BE%E9%BE%99%E5%A8%B1%E4%B9%90%E5%AE%98%E7%BD%91TL262%C2%B7C%EF%BC%AFM%E9%BB%84%E7%9F%B3%E7%94%9F%E6%B4%BB%EF%BC%AA%EF%BC%A6%EF%BC%AE&from=search http://search.dangdang.com/?key=%C3%E5%B5%E9%CE%AC%BC%D3%CB%B9%CD%F8%CD%B6%B2%BF%B9%D9%CD%F8B2024%A1%A4CN%C4%CF%C6%BD%B7%D6%B9%AB%CB%BE%A3%D9%A3%CF%A3%C2&act=input http://iias.tsinghua.edu.cn/search/%E6%B1%9F%E8%8B%8F%E7%9B%90%E5%9F%8E%E6%89%8B%E6%9C%BA%E7%BD%91%E6%8A%95%E5%B9%B3%E5%8F%B0%E3%80%90%E5%AE%98%E7%BD%91%E2%86%92TL262%C2%B7C%EF%BC%AFM%E3%80%91%E9%95%BF%E6%B2%99%E6%8B%9B%E8%81%98 https://www.duitang.com/search/?kw=%E8%80%81%E8%A1%97%E8%85%BE%E9%BE%99%E5%A8%B1%E4%B9%90%E7%BD%91%E5%9D%80%E9%9B%86%E5%9B%A2%E5%AE%A2%E6%9C%8D%E5%9C%A8%E7%BA%BF%E5%BC%80%E6%88%B7TL262.c%EF%BC%AF%EF%BC%AD%E5%90%88%E8%82%A5%E5%8D%AB%E8%AE%A1%E5%A7%94%EF%BC%AE&type=album

0
#9fujiayi1984回复于2018-07

目前问题已经解决,连接公用的wifi,没有连互联网,在线立即失败。

0
#8氧气是你gg回复于2018-07

不知道你们解决了吗

 

0
#7氧气是你gg回复于2018-07

我也遇到了

 

0
#6fujiayi1984回复于2017-12

您好,这个问题我们会统一反馈下。

0
#5灬流星泪回复于2017-12

我也碰到这个问题了。主要是需要在线识别超时才能进行离线识别,但是这个超时时间也不能设置的太短,不然在某些网络状态不好的情况下,明明可以在线识别,却返回了识别失败。不过可以将网络是否可达和识别过程区分开

0
#4石浦雪菜小黄鱼回复于2017-11

是不是我说了其他公司产品的好话,你们就不回复我了?

我只是提了一个中肯的建议,改进SDK库的性能,用户体验更好了,

可以提高百度语音的使用率啊。 

0
#3石浦雪菜小黄鱼回复于2017-10

强制在线我明白,但是我一直不接外网,就相当于一直离线,

这样用户会觉得怎么每次都要等待很久才会显示识别结果。


用户体验好像不太好,我试了讯飞的离线识别

它们就能立刻判断出在线未联网,然后马上给出识别结果。。


是不是可以反馈一下?做一下改进。谢谢

0
#2fujiayi1984回复于2017-10

石浦雪菜小黄鱼:

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

下载的SDK版本是:bd_speech_sdk_asr_v3.0.3.20170801_60da871


离线语音识别功能已经从你们提供的DEMO中移到了自己的工程中,没有联上WIFI的时候,离线命令识别速度还算挺快的。则只要几十ms就够了。  


然后联上路由器【该路由器没有接电信网络】,这时候平板显示连上WIFI,但事实上不能上网的

这时候,离线命令识别就会很慢,从日志来看,是先去申请在线语音识别,然后发现网络不通,再转为

离线语音识别,   整个过程,从说出“呼叫赵六”到显示识别成功,耗时【12700ms】。 


我也试了讯飞的SDK,他们的离线命令识别就没有这个问题,【有WIFI,但不能连接外网】的情况下仍然

很快的得出结果。


请教一下,这算不算一个BUG??



日志如下:

10-27 17:26:53.134: I/MyRecognizer.Debug(23970): asr params(反馈请带上此行日志):{"decoder":2}

10-27 17:26:53.140: E/ASREngine(23970): VAD Model=model-vad

10-27 17:26:53.183: W/audioSource :(23970): 1

10-27 17:26:53.197: I/RecogEventAdapter(23970): name:asr.ready; params:null

10-27 17:26:53.197: I/System.out(23970): 引擎就绪,可以开始说话。  ;time=1509096413197

10-27 17:26:53.200: I/AudioRecordPermission(23970): remindWithResult:false

10-27 17:26:53.200: I/HwAudioRecordImpl(23970): checkRecordActive

10-27 17:26:53.215: I/HwAudioRecordImpl(23970): sendStateChangedIntent, state=3

10-27 17:26:53.322: I/MicrophoneServer(23970): audio mills is 0

10-27 17:26:53.364: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":2,"volume":124}

10-27 17:26:53.364: I/StatusRecogListener(23970): 音量百分比2 ; 音量124

10-27 17:26:53.564: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":1,"volume":61}

10-27 17:26:53.564: I/StatusRecogListener(23970): 音量百分比1 ; 音量61

10-27 17:26:53.764: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":49}

10-27 17:26:53.764: I/StatusRecogListener(23970): 音量百分比0 ; 音量49

10-27 17:26:53.964: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":34,"volume":1727}

10-27 17:26:53.964: I/StatusRecogListener(23970): 音量百分比34 ; 音量1727

10-27 17:26:54.163: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":64,"volume":3245}

10-27 17:26:54.163: I/StatusRecogListener(23970): 音量百分比64 ; 音量3245

10-27 17:26:54.369: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":56,"volume":2833}

10-27 17:26:54.369: I/StatusRecogListener(23970): 音量百分比56 ; 音量2833

10-27 17:26:54.372: I/RecogEventAdapter(23970): name:asr.sn; params:{"sn":"cuid=A2F84FB5972FC733006470D7BF256648|84310111871UNFNA&sn=fcf3ee5c-b01f-4020-ab77-e3a8976bce84&nettype=4"}

10-27 17:26:54.372: I/RecogEventAdapter(23970): name:asr.begin; params:null

10-27 17:26:54.372: I/System.out(23970): 检测到用户说话  ;time=1509096414372

10-27 17:26:54.563: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":0}

10-27 17:26:54.563: I/StatusRecogListener(23970): 音量百分比0 ; 音量0

10-27 17:26:54.766: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":0}

10-27 17:26:54.766: I/StatusRecogListener(23970): 音量百分比0 ; 音量0

10-27 17:26:54.964: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":6,"volume":327}

10-27 17:26:54.964: I/StatusRecogListener(23970): 音量百分比6 ; 音量327

10-27 17:26:55.167: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":9}

10-27 17:26:55.167: I/StatusRecogListener(23970): 音量百分比0 ; 音量9

10-27 17:26:55.364: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":9}

10-27 17:26:55.364: I/StatusRecogListener(23970): 音量百分比0 ; 音量9

10-27 17:26:55.568: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":2}

10-27 17:26:55.568: I/StatusRecogListener(23970): 音量百分比0 ; 音量2

10-27 17:26:55.764: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":3}

10-27 17:26:55.764: I/StatusRecogListener(23970): 音量百分比0 ; 音量3

10-27 17:26:55.966: I/RecogEventAdapter(23970): name:asr.volume; params:{"volume-percent":0,"volume":3}

10-27 17:26:55.966: I/StatusRecogListener(23970): 音量百分比0 ; 音量3

10-27 17:26:56.124: I/RecogEventAdapter(23970): name:asr.end; params:{"vad_silent_start":"1509096416120"}

10-27 17:26:56.124: I/System.out(23970): 检测到用户说话结束  ;time=1509096416124

10-27 17:26:56.265: I/HwAudioRecordImpl(23970): sendStateChangedIntent, state=1

10-27 17:27:01.184: W/System.err(23970): java.net.SocketException: Socket closed

10-27 17:27:01.184: W/System.err(23970):  at java.net.PlainSocketImpl.socketAccept(Native Method)

10-27 17:27:01.184: W/System.err(23970):  at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:389)

10-27 17:27:01.184: W/System.err(23970):  at java.net.ServerSocket.implAccept(ServerSocket.java:534)

10-27 17:27:01.184: W/System.err(23970):  at java.net.ServerSocket.accept(ServerSocket.java:502)

10-27 17:27:01.184: W/System.err(23970):  at com.baidu.speech.audio.MicrophoneServer$1.run(Unknown Source)

10-27 17:27:08.819: I/RecogEventAdapter(23970): name:asr.partial; params:{"results_recognition":["呼叫105"],"origin_result":{"content":{"item":["呼叫105"]},"result":{"sn":"KWS","version":"easr.kws.v1","raw_text":"呼叫105","scene_id":0,"score":0.81,"_results":{"name":{"keyword":"105","keyword_nbest":["105"],"score":0.82}}}},"error":0,"best_result":"呼叫105","result_type":"partial_result"}

10-27 17:27:08.820: I/System.out(23970): 临时识别结果,结果是“呼叫105”;原始json:{"results_recognition":["呼叫105"],"origin_result":{"content":{"item":["呼叫105"]},"result":{"sn":"KWS","version":"easr.kws.v1","raw_text":"呼叫105","scene_id":0,"score":0.81,"_results":{"name":{"keyword":"105","keyword_nbest":["105"],"score":0.82}}}},"error":0,"best_result":"呼叫105","result_type":"partial_result"}  ;time=1509096428820

10-27 17:27:08.822: I/RecogEventAdapter(23970): name:asr.partial; params:{"results_recognition":["呼叫105"],"origin_result":{"content":{"item":["呼叫105"]},"result":{"sn":"KWS","version":"easr.kws.v1","raw_text":"呼叫105","scene_id":0,"score":0.81,"_results":{"name":{"keyword":"105","keyword_nbest":["105"],"score":0.82}}}},"error":0,"best_result":"呼叫105","result_type":"final_result"}

10-27 17:27:08.822: I/SendBroadcastPermission(23970): action:com.ifly.asr.result, mPermissionType:0

10-27 17:27:08.824: I/System.out(23970): -->识别结束,结果是”呼叫105”

10-27 17:27:08.824: I/System.out(23970): 识别结束,结果是”呼叫105”“;原始json:{"results_recognition":["呼叫105"],"origin_result":{"content":{"item":["呼叫105"]},"result":{"sn":"KWS","version":"easr.kws.v1","raw_text":"呼叫105","scene_id":0,"score":0.81,"_results":{"name":{"keyword":"105","keyword_nbest":["105"],"score":0.82}}}},"error":0,"best_result":"呼叫105","result_type":"final_result"}

10-27 17:27:08.824: I/System.out(23970): 识别结束,结果是”呼叫105”;说话结束到识别结束耗时【12700ms】

10-27 17:27:08.824: I/RecogEventAdapter(23970): name:asr.finish; params:{"error":0,"origin_result":{"error":"Speech Recognize success.","err_no":0},"desc":"Speech Recognize success."}

10-27 17:27:08.824: I/System.out(23970): 识别一段话结束。如果是长语音的情况会继续识别下段话。


回复石浦雪菜小黄鱼:强制在线优先,在线的判断是手机的联网状态。

0
TOP
切换版块