Offline engine not initi
学而时习之bu 发布于2019-04 浏览:2552 回复:5
0
收藏

04-02 17:24:40.462 7425-7425/? I/MicrophoneServer: infile: audioSource:1
04-02 17:24:40.463 7425-7499/? I/AutoCheck: Url is http://openapi.baidu.com/oauth/2.0/token?client_id=UdyblxDeEBI2ISadSVQcSjPt&client_secret=MaTr0PveV3kiUk2K2961lXNUGa4clvST&grant_type=client_credentials
04-02 17:24:40.465 7425-7425/? E/ASREngine: VAD Model=dnn
04-02 17:24:40.466 7425-7425/? I/[BDASR_LOG] Policy: use custom galaxy = false
04-02 17:24:40.466 7425-7425/? D/Device: read deviceID:FA2E6D8157A8EE64747387F671CBBD0C|0
04-02 17:24:40.472 7425-7425/? I/com.example.bdspeech.ASROffline: 输入参数:{"decoder":2,"accept-audio-volume":false} ;time=1554197080472
04-02 17:24:40.474 7425-7500/? I/[BDASR_LOG] MicrophoneServer: add wrap socket, mRemoteOutputStreams size = 1 firstStart = true
04-02 17:24:40.479 7425-7441/? V/ASREngine: ASRCallBack :0
04-02 17:24:40.481 2798-3929/? D/AudioIntelHal: openInputStream: handle=129, devices: 0x80000010, input source: 0x1, input flags: 0x0
04-02 17:24:40.481 2798-3929/? D/AudioStream: set: requested channel mask: 16 (Channels count: 1)
04-02 17:24:40.481 2798-3929/? D/AudioStream: set: set channels to 16
04-02 17:24:40.481 2798-3929/? D/AudioStream: set: requested rate: 16000
04-02 17:24:40.481 2798-3929/? D/AudioStream: set: set rate to 16000
04-02 17:24:40.481 2798-3929/? D/AudioStream: set: requested format: 1
04-02 17:24:40.481 2798-3929/? D/AudioStream: set : set format to 1
04-02 17:24:40.481 2798-3929/? D/AudioIntelHal: openInputStream: input created with status=0
04-02 17:24:40.481 2798-3929/? D/AudioStream: getBufferSize: 640 (in bytes) for input stream.
04-02 17:24:40.481 2798-3929/? D/AudioStream: getBufferSize: 640 (in bytes) for input stream.
04-02 17:24:40.482 2798-7503/? I/AudioFlinger: AudioFlinger's thread 0xe9f7d000 ready to run
04-02 17:24:40.486 7425-7500/? I/[BDASR_LOG] audioSource :: 1
04-02 17:24:40.486 7425-7500/? I/[BDASR_LOG] MicInputStream: startRecordingAndCheckStatus recorder status is 1
04-02 17:24:40.488 2798-7503/? D/AudioIntelHal/AudioPlatformState: setParameters: key value pair input_devices=0;input_flags=0;input_sources=0;pre_proc_requested=0;voip_band_type=2
04-02 17:24:40.488 2798-7503/? W/AUDIOCOMMS: setValue: unknown parameter value(2) for voip_band_type
04-02 17:24:40.491 7425-7441/? V/ASREngine: ASRCallBack :8
04-02 17:24:40.491 7425-7441/? E/ASREngine: EVoiceRecognitionClientWorkStatusError errorDomain : 34 errorCode : 5 desc : [KWS] has not initialized. mLastRecognitionResult:
04-02 17:24:40.491 7425-7441/? D/ASREngine: generateErrorResult errDomain = 34 errCode = 5
04-02 17:24:40.493 7425-7425/? W/AutoCheckMessage: 【识别】集成自动排查工具: 恭喜没有检测到任何问题
04-02 17:24:40.493 7425-7425/? I/com.example.bdspeech.ASROffline: name: asr.ready ;params :{"pid":1536,"sn":"ea1efd1d-a2aa-4f01-91b6-01a15eca402b"} ;time=1554197080493
04-02 17:24:40.494 7425-7425/? I/com.example.bdspeech.ASROffline: name: asr.finish ;params :{"origin_result":{"sn":"","error":10,"desc":"Offline engine not initial","sub_error":10005},"error":10,"desc":"Offline engine not initial","sub_error":10005} ;time=1554197080494
04-02 17:24:40.495 7425-7441/? V/ASREngine: ASRCallBack :18
04-02 17:24:40.496 7425-7425/? I/com.example.bdspeech.ASROffline: name: asr.exit ;time=1554197080496
04-02 17:24:40.500 2798-7503/? D/PROPERTY: get media.dump_input.befconv: 0
04-02 17:24:40.500 2798-7503/? D/PROPERTY: get media.dump_input.aftconv: 0
04-02 17:24:40.500 2798-7503/? D/AudioStream: setStandby: starting input stream

 

报错如上图所示,网友提示将bsg文件放在assets文件夹,但是我已经放进去了,还是现实离线引擎未初始化,求解答

收藏
点赞
0
个赞
共5条回复 最后由用户已被禁言回复于2022-04
#6用户已被禁言回复于2019-04
#5 学而时习之bu回复
demo跑通了,能够正常的加载离线引擎,识别离线命令词。 我是把识别模块打包成aar给unity用的,这个问题有什么特殊之处吗?  
展开

demo能跑通则不是SDK的问题。

0
#5学而时习之bu回复于2019-04

demo跑通了,能够正常的加载离线引擎,识别离线命令词。

我是把识别模块打包成aar给unity用的,这个问题有什么特殊之处吗?

 

0
#4用户已被禁言回复于2019-04
#3 学而时习之bu回复
你好,谢谢你的回答。但是以上原因都排查过: 1.so文件我确定放在jnilab文件夹内了; 2.离线授权的参数也确定是对的; 3.参数设置我是直接用的ActivityMiniRecog中的参数,没有改变。 private void loadOfflineEngine() { Map<String, Object> params = new LinkedHashMap<String, Object>(); params.put(SpeechConstant.DECODER, 2); params.put(SpeechConstant.ASR_OFFLINE_ENGINE_GRAMMER_FILE_PATH, "assets://baidu_speech_grammar.bsg"); asr.send(SpeechConstant.ASR_KWS_LOAD_ENGINE, new JSONObject(params).toString(), null, 0, 0); } 但是依然会出现引擎未初始化。求解答。
展开

demo跑通了吗?是否也有次报错?

0
#3学而时习之bu回复于2019-04

你好,谢谢你的回答。但是以上原因都排查过:

1.so文件我确定放在jnilab文件夹内了;

2.离线授权的参数也确定是对的;

3.参数设置我是直接用的ActivityMiniRecog中的参数,没有改变。

private void loadOfflineEngine() {
Map params = new LinkedHashMap();
params.put(SpeechConstant.DECODER, 2);
params.put(SpeechConstant.ASR_OFFLINE_ENGINE_GRAMMER_FILE_PATH, "assets://baidu_speech_grammar.bsg");
asr.send(SpeechConstant.ASR_KWS_LOAD_ENGINE, new JSONObject(params).toString(), null, 0, 0);
}

但是依然会出现引擎未初始化。求解答。

0
#2用户已被禁言回复于2019-04

10005,引擎没有被初始化。出现原因如:使用离线识别但未将EASR.so集成到程序中;离线授权的参数填写不正确;参数设置错误等。线检查参数

0
TOP
切换版块