内置语音apk到/system/app下的问题
luwei35910 发布于2018-03-12 19:41 浏览:1037 回复:16
0
收藏

 

0. 您的联系方式 : 
百度语音开发者交流⑤群 864371845
Tel:18701745401


1. 现象描述
编译出来的apk直接安装可用。


但是把apk内置到/system/app 解压出的lib/armeabi库内置到/system/lib 无法开始录音
设置VAD算法选择touch模式 可以录音.

对照文档并未发现不妥之处 项目中也无其他so库 推送MD5值也都相同。   

2. 输入参数:
{"accept-audio-volume":false,"accept-audio-data":false,"disable-punctuation":false,"vad":"dnn"}


3. 输出结果:
asr error:{"sub_error":3100,"error":3,"origin_result":{"sub_error":3100,"error":3,"sn":"cuid=A73B802A99DE8C66C9C18019652CE692|2511&sn=32290888-0241-4608-811a-be88a9e2d6b1&nettype=1","desc":"VAD is not available"},"desc":"VAD is not available"}
   
4 .用户日志:
  先清空日志,之后调用我们的某个方法结束。请提供给我们之中的完整日志。


5 .手机信息:
   hi3796mv100盒子 Android4.4.2

 

#先清空日志,之后调用我们的某个方法出错。请提供给我们之中的完整日志。


03-12 19:27:32.669 2240-2639/com.hisilicon.android.hiRMService I/HiRMService:  ***** changeStats = 0
03-12 19:27:35.131 1918-1998/system_process D/KeyLayoutMap: gc: scanCode=28, usageCode=0x00000000 
03-12 19:27:35.131 1918-1998/system_process D/KeyLayoutMap: gc: scanCode index =27
03-12 19:27:35.131 1918-1998/system_process D/KeyLayoutMap: mapKey: scanCode=28, usageCode=0x00000000 ~ Result keyCode=23, outFlags=0x00000000.
03-12 19:27:35.133 2255-2255/com.hisilicon.android.inputmethod.remote D/RemoteIME: keycode: 23, realAction: false
03-12 19:27:35.340 1918-1998/system_process D/KeyLayoutMap: gc: scanCode=28, usageCode=0x00000000 
03-12 19:27:35.340 1918-1998/system_process D/KeyLayoutMap: gc: scanCode index =27
03-12 19:27:35.340 1918-1998/system_process D/KeyLayoutMap: mapKey: scanCode=28, usageCode=0x00000000 ~ Result keyCode=23, outFlags=0x00000000.
03-12 19:27:35.341 2255-2255/com.hisilicon.android.inputmethod.remote D/RemoteIME: keycode: 23, realAction: true
03-12 19:27:35.343 1417-1917/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:35.343 1417-1917/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 0, device 2
03-12 19:27:35.343 1417-1917/? V/AudioPolicyManagerBase: getOutput() device 2, stream 1, samplingRate 0, format 0, channelMask 3, flags 0
03-12 19:27:35.343 1417-1917/? V/AudioPolicyManagerBase: getOutputsForDevice() device 0002
03-12 19:27:35.343 1417-1917/? V/AudioPolicyManagerBase: output 0 isDuplicated=0 device=0006
03-12 19:27:35.343 1417-1917/? V/AudioPolicyManagerBase: getOutputsForDevice() found output 2
03-12 19:27:35.343 1417-1917/? V/AudioPolicyManagerBase: getOutput() returns output 2
03-12 19:27:35.343 1417-2561/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:35.343 1417-2561/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 0, device 2
03-12 19:27:35.343 1417-2561/? V/AudioPolicyManagerBase: getOutput() device 2, stream 1, samplingRate 0, format 0, channelMask 3, flags 0
03-12 19:27:35.343 1417-2561/? V/AudioPolicyManagerBase: getOutputsForDevice() device 0002
03-12 19:27:35.343 1417-2561/? V/AudioPolicyManagerBase: output 0 isDuplicated=0 device=0006
03-12 19:27:35.343 1417-2561/? V/AudioPolicyManagerBase: getOutputsForDevice() found output 2
03-12 19:27:35.343 1417-2561/? V/AudioPolicyManagerBase: getOutput() returns output 2
03-12 19:27:35.343 1417-2479/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:35.343 1417-2479/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 0, device 2
03-12 19:27:35.343 1417-2479/? V/AudioPolicyManagerBase: getOutput() device 2, stream 1, samplingRate 48000, format 1, channelMask 3, flags 4
03-12 19:27:35.343 1417-2479/? V/AudioPolicyManagerBase: getOutputsForDevice() device 0002
03-12 19:27:35.343 1417-2479/? V/AudioPolicyManagerBase: output 0 isDuplicated=0 device=0006
03-12 19:27:35.343 1417-2479/? V/AudioPolicyManagerBase: getOutputsForDevice() found output 2
03-12 19:27:35.343 1417-2479/? V/AudioPolicyManagerBase: getOutput() returns output 2
03-12 19:27:35.344 1417-1417/? D/AudioPolicyManagerBase: startOutput() output 2, stream 1, session 166
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: changeRefCount() stream 1, count 1
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 0, device 2
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: getNewDevice() selected device 2
03-12 19:27:35.344 1417-1417/? D/AudioPolicyManagerBase: startoutput ->setOutputDevice
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: setOutputDevice() output 2 device 0002 delayMs 0
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: setOutputDevice() prevDevice 0002
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 0, device 2
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 1, device 2
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 2, device 2
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 2, device 2
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 3, device 2
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 0, device 2
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 4, device 2
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 5, device 2
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: setOutputDevice() setting same device 0002 or null device for output 2
03-12 19:27:35.344 1417-1417/? V/AudioPolicyManagerBase: VOLUME vol index=[33 53 66], dB=[-18.0 -14.4 -12.0] ampl=0.19135
03-12 19:27:35.344 1417-1417/? D/AudioPolicyManagerBase: AudioPolicyManagerBase::checkAndSetVolume 8,0.191346
03-12 19:27:35.345 2703-2703/com.henggu.voicecontrol I/MyRecognizer.Debug: asr params(反馈请带上此行日志):{"accept-audio-volume":false,"accept-audio-data":false,"disable-punctuation":false,"vad":"dnn"}
03-12 19:27:35.345 1417-1913/? V/AudioPolicyManagerBase: releaseOutput() 2
03-12 19:27:35.377 2703-2703/com.henggu.voicecontrol D/dalvikvm: GC_FOR_ALLOC freed 2165K, 49% free 5659K/10952K, paused 26ms, total 26ms
03-12 19:27:35.379 2703-2703/com.henggu.voicecontrol I/dalvikvm-heap: Grow heap (frag case) to 7.453MB for 1920016-byte allocation
03-12 19:27:35.402 2703-2703/com.henggu.voicecontrol D/dalvikvm: GC_FOR_ALLOC freed 7K, 32% free 7527K/10952K, paused 23ms, total 23ms
03-12 19:27:35.404 2703-2703/com.henggu.voicecontrol E/ASREngine: VAD Model=dnn
03-12 19:27:35.408 2703-2703/com.henggu.voicecontrol W/System.err: java.lang.ClassNotFoundException: com.baidu.android.common.util.DeviceId
03-12 19:27:35.409 2703-2703/com.henggu.voicecontrol W/System.err:     at java.lang.Class.classForName(Native Method)
03-12 19:27:35.409 2703-2703/com.henggu.voicecontrol W/System.err:     at java.lang.Class.forName(Class.java:251)
03-12 19:27:35.409 2703-2703/com.henggu.voicecontrol W/System.err:     at java.lang.Class.forName(Class.java:216)
03-12 19:27:35.409 2703-2703/com.henggu.voicecontrol W/System.err:     at com.baidu.speech.utils.Policy.uid(Unknown Source)
03-12 19:27:35.409 2703-2703/com.henggu.voicecontrol W/System.err:     at com.baidu.speech.core.ASREngine.initConfig(Unknown Source)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at com.baidu.speech.core.ASREngine.postEvent(Unknown Source)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at com.baidu.speech.asr.EventManagerAsr.send(Unknown Source)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at com.baidu.android.voicedemo.a.b.b(Unknown Source)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at com.baidu.android.voicedemo.activity.b.l(Unknown Source)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at com.baidu.android.voicedemo.activity.b$1.onClick(Unknown Source)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.View.performClick(View.java:4438)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.View.onKeyUp(View.java:8241)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at android.widget.TextView.onKeyUp(TextView.java:5628)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.KeyEvent.dispatch(KeyEvent.java:2696)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.View.dispatchKeyEvent(View.java:7665)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1408)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1408)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1408)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1408)
03-12 19:27:35.410 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1408)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1408)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:2035)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1505)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at android.app.Activity.dispatchKeyEvent(Activity.java:2420)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at android.support.v7.app.c.dispatchKeyEvent(Unknown Source)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at android.support.v7.view.i.dispatchKeyEvent(Unknown Source)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at android.support.v7.app.f$a.dispatchKeyEvent(Unknown Source)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1962)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:3861)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3835)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3408)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3458)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3427)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3534)
03-12 19:27:35.411 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3435)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3591)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3408)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3458)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3427)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3435)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3408)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3458)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3427)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3567)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:3727)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:2011)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:1705)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:1696)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:1988)
03-12 19:27:35.412 2703-2703/com.henggu.voicecontrol W/System.err:     at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141)
03-12 19:27:35.413 2703-2703/com.henggu.voicecontrol W/System.err:     at android.os.MessageQueue.nativePollOnce(Native Method)
03-12 19:27:35.413 2703-2703/com.henggu.voicecontrol W/System.err:     at android.os.MessageQueue.next(MessageQueue.java:138)
03-12 19:27:35.413 2703-2703/com.henggu.voicecontrol W/System.err:     at android.os.Looper.loop(Looper.java:123)
03-12 19:27:35.413 2703-2703/com.henggu.voicecontrol W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5030)
03-12 19:27:35.413 2703-2703/com.henggu.voicecontrol W/System.err:     at java.lang.reflect.Method.invokeNative(Native Method)
03-12 19:27:35.413 2703-2703/com.henggu.voicecontrol W/System.err:     at java.lang.reflect.Method.invoke(Method.java:515)
03-12 19:27:35.413 2703-2703/com.henggu.voicecontrol W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
03-12 19:27:35.413 2703-2703/com.henggu.voicecontrol W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:649)
03-12 19:27:35.413 2703-2703/com.henggu.voicecontrol W/System.err:     at dalvik.system.NativeStart.main(Native Method)
03-12 19:27:35.413 2703-2703/com.henggu.voicecontrol W/System.err: Caused by: java.lang.NoClassDefFoundError: com/baidu/android/common/util/DeviceId
03-12 19:27:35.415 2703-2703/com.henggu.voicecontrol W/System.err: ... 59 more
03-12 19:27:35.415 2703-2703/com.henggu.voicecontrol W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.baidu.android.common.util.DeviceId" on path: DexPathList[[zip file "/system/app/app-debug.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
03-12 19:27:35.416 2703-2703/com.henggu.voicecontrol W/System.err:     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
03-12 19:27:35.416 2703-2703/com.henggu.voicecontrol W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
03-12 19:27:35.416 2703-2703/com.henggu.voicecontrol W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
03-12 19:27:35.416 2703-2703/com.henggu.voicecontrol W/System.err: ... 59 more
03-12 19:27:35.416 2703-2703/com.henggu.voicecontrol D/Device: read deviceID:A73B802A99DE8C66C9C18019652CE692|2511
03-12 19:27:35.421 2703-2703/com.henggu.voicecontrol E/TelephonyManager: cts.appProcess.processName:com.henggu.voicecontrol
                                                                         
                                                                         [ 03-12 19:27:35.429  2703: 3035 E/[%s:%d]failed to open dnn model file[%s]
                                                                          ]
                                                                         jni/../../../../../core/VAD/DNNVAD/vad_nn.cpp
                                                                         
                                                                         [ 03-12 19:27:35.429  2703: 3035 E/[%s:%d]DNN Init Failed
                                                                          ]
                                                                         jni/../../../../../core/VAD/DNNVAD/dnn_vad.cpp
03-12 19:27:35.430 2703-3111/com.henggu.voicecontrol I/BDSHttpRequestMaker: url = http://vop.baidu.com/v2/up?sn=f75ab4c5-ada4-48a3-9d18-6aafd8ff0f7a &2cfe8518, 
03-12 19:27:35.430 2703-3035/com.henggu.voicecontrol E/ASREngine: EVoiceRecognitionClientWorkStatusError errorDomain : 20 errorCode : 1 desc : VAD start: start error. mLastRecognitionResult: 
03-12 19:27:35.430 2703-3035/com.henggu.voicecontrol D/ASREngine: generateErrorResult errDomain = 20 errCode = 1
03-12 19:27:35.430 2703-3111/com.henggu.voicecontrol D/BDSHttpRequestMaker: url: http://vop.baidu.com/v2/up?sn=f75ab4c5-ada4-48a3-9d18-6aafd8ff0f7a mHostIp: vop.baidu.com &2cfe8518, 
03-12 19:27:35.432 1417-1917/? V/AudioPolicyManagerBase: getDeviceForInputSource()input source 1, device 81000000
03-12 19:27:35.432 1417-1917/? V/AudioPolicyManagerBase: getInput() inputSource 1, samplingRate 16000, format 1, channelMask 10, acoustics 0
03-12 19:27:35.432 1417-1917/? I/legacy_audio_hw_hal: adev_open_input_stream 1000000
03-12 19:27:35.432 1417-1917/? D/ALSAModule: open called for devices 01000000 in mode 0...
03-12 19:27:35.433 1417-1917/? E/ALSAModule: device CardId is 2
03-12 19:27:35.433 1417-1917/? E/ALSAModule: device name is AndroidCapture_Headset_normal
03-12 19:27:35.435 1417-1917/? V/ALSAModule: Set CAPTURE PCM format to S16_LE (Signed 16 bit Little Endian)
03-12 19:27:35.435 1417-1917/? V/ALSAModule: Using 1 channel for CAPTURE.
03-12 19:27:35.435 1417-1917/? V/ALSAModule: Set sample rate to 16000 HZ
03-12 19:27:35.436 1417-1917/? V/ALSAModule: Buffer size: 2048
03-12 19:27:35.436 1417-1917/? V/ALSAModule: Latency: 128000
03-12 19:27:35.440 1417-1917/? I/ALSAModule: Initialized ALSA device 1000000
03-12 19:27:35.440 1417-1917/? I/AudioHardwareALSA: ALSAStreamOps::sampleRate 16000
03-12 19:27:35.445 1417-2479/? V/AudioPolicyManagerBase: startInput() input 168
03-12 19:27:35.445 1417-2479/? V/AudioPolicyManagerBase: getDeviceForInputSource()input source 1, device 81000000
03-12 19:27:35.445 1417-2479/? V/AudioPolicyManagerBase: AudioPolicyManager::startInput() input source = 1
03-12 19:27:35.446 1417-3184/? D/ALSAModule: route called for devices 01000000 in mode 0...
03-12 19:27:35.447 1417-3184/? D/ALSAModule: open called for devices 01000000 in mode 0...
03-12 19:27:35.447 1417-3184/? E/ALSAModule: device CardId is 2
03-12 19:27:35.447 1417-3184/? E/ALSAModule: device name is AndroidCapture_Headset_normal
03-12 19:27:35.449 1417-3184/? V/ALSAModule: Set CAPTURE PCM format to S16_LE (Signed 16 bit Little Endian)
03-12 19:27:35.449 2703-2703/com.henggu.voicecontrol I/ActivityCommon: log:[INFO]asr params(反馈请带上此行日志):{"accept-audio-volume":false,"accept-audio-data":false,"disable-punctuation":false,"vad":"dnn"}
                                                                        
03-12 19:27:35.449 1417-3184/? V/ALSAModule: Using 1 channel for CAPTURE.
03-12 19:27:35.449 2703-2703/com.henggu.voicecontrol I/RecogEventAdapter: name:asr.finish; params:{"sub_error":3100,"error":3,"origin_result":{"sub_error":3100,"error":3,"sn":"cuid=A73B802A99DE8C66C9C18019652CE692|2511&sn=32290888-0241-4608-811a-be88a9e2d6b1&nettype=1","desc":"VAD is not available"},"desc":"VAD is not available"}
03-12 19:27:35.450 1417-3184/? V/ALSAModule: Set sample rate to 16000 HZ
03-12 19:27:35.450 2703-2703/com.henggu.voicecontrol E/RecogEventAdapter: asr error:{"sub_error":3100,"error":3,"origin_result":{"sub_error":3100,"error":3,"sn":"cuid=A73B802A99DE8C66C9C18019652CE692|2511&sn=32290888-0241-4608-811a-be88a9e2d6b1&nettype=1","desc":"VAD is not available"},"desc":"VAD is not available"}
03-12 19:27:35.450 2703-2703/com.henggu.voicecontrol I/RecogEventAdapter: name:asr.exit; params:null
03-12 19:27:35.450 1417-3184/? V/ALSAModule: Buffer size: 2048
03-12 19:27:35.450 1417-3184/? V/ALSAModule: Latency: 128000
03-12 19:27:35.454 1417-3184/? I/ALSAModule: Initialized ALSA device 1000000
03-12 19:27:35.460 2703-3111/com.henggu.voicecontrol I/BDSHttpRequestMaker: url = http://vop.baidu.com/v2/down?sn=f75ab4c5-ada4-48a3-9d18-6aafd8ff0f7a &2cff1cf8, 
03-12 19:27:35.460 2703-3111/com.henggu.voicecontrol D/BDSHttpRequestMaker: url: http://vop.baidu.com/v2/down?sn=f75ab4c5-ada4-48a3-9d18-6aafd8ff0f7a mHostIp: vop.baidu.com &2cff1cf8, 
03-12 19:27:35.474 2703-2703/com.henggu.voicecontrol I/ActivityCommon: log:[ERROR]asr error:{"sub_error":3100,"error":3,"origin_result":{"sub_error":3100,"error":3,"sn":"cuid=A73B802A99DE8C66C9C18019652CE692|2511&sn=32290888-0241-4608-811a-be88a9e2d6b1&nettype=1","desc":"VAD is not available"},"desc":"VAD is not available"}
                                                                        
03-12 19:27:35.475 2703-2703/com.henggu.voicecontrol I/ActivityCommon: log:识别错误, 错误码:3,-1;错误消息:音频问题;描述信息:VAD is not available 
03-12 19:27:35.476 2703-2703/com.henggu.voicecontrol I/ActivityCommon: log:识别错误, 错误码:3,-1 
03-12 19:27:35.478 2703-2703/com.henggu.voicecontrol I/ActivityCommon: log:识别引擎结束并空闲中  ;time=1520854055450 
03-12 19:27:35.480 2703-3111/com.henggu.voicecontrol I/BDSHttpRequestMaker: AudioData : mType = 3 | mIsLast = true | mData = 5 &2cff1cf8, 
03-12 19:27:35.480 2703-3111/com.henggu.voicecontrol I/BDSHttpRequestMaker: DownloadThread mData[0] = 1 &2cff1cf8, 
03-12 19:27:35.480 2703-3111/com.henggu.voicecontrol I/BDSHttpRequestMaker: DownloadThread mData[1] = 0 &2cff1cf8, 
03-12 19:27:35.480 2703-3111/com.henggu.voicecontrol I/BDSHttpRequestMaker: DownloadThread mData[2] = 0 &2cff1cf8, 
03-12 19:27:35.480 2703-3111/com.henggu.voicecontrol I/BDSHttpRequestMaker: DownloadThread mData[3] = 0 &2cff1cf8, 
03-12 19:27:35.480 2703-3111/com.henggu.voicecontrol I/BDSHttpRequestMaker: DownloadThread mData[4] = 3 &2cff1cf8, 
03-12 19:27:35.482 2703-3111/com.henggu.voicecontrol I/BDSHttpRequestMaker: sendData  dataType : 0 http://vop.baidu.com/v2/up?sn=f75ab4c5-ada4-48a3-9d18-6aafd8ff0f7a &2cfe8518, 
03-12 19:27:35.484 2703-2789/com.henggu.voicecontrol I/BDSHttpRequestMaker: Exception &2cff1cf8, 
03-12 19:27:35.484 2703-2789/com.henggu.voicecontrol W/System.err: java.net.SocketException: Socket closed
03-12 19:27:35.485 2703-2789/com.henggu.voicecontrol W/System.err:     at libcore.io.Posix.recvfromBytes(Native Method)
03-12 19:27:35.485 2703-2789/com.henggu.voicecontrol W/System.err:     at libcore.io.Posix.recvfrom(Posix.java:141)
03-12 19:27:35.485 2703-2789/com.henggu.voicecontrol W/System.err:     at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)
03-12 19:27:35.485 2703-2789/com.henggu.voicecontrol W/System.err:     at libcore.io.IoBridge.recvfrom(IoBridge.java:506)
03-12 19:27:35.485 2703-2789/com.henggu.voicecontrol W/System.err:     at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
03-12 19:27:35.485 2703-2789/com.henggu.voicecontrol W/System.err:     at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
03-12 19:27:35.485 2703-2789/com.henggu.voicecontrol W/System.err:     at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
03-12 19:27:35.485 2703-2789/com.henggu.voicecontrol W/System.err:     at java.io.InputStream.read(InputStream.java:162)
03-12 19:27:35.485 2703-2789/com.henggu.voicecontrol W/System.err:     at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142)
03-12 19:27:35.485 2703-2789/com.henggu.voicecontrol W/System.err:     at java.io.BufferedInputStream.read(BufferedInputStream.java:227)
03-12 19:27:35.486 2703-2789/com.henggu.voicecontrol W/System.err:     at com.android.okhttp.internal.Util.readAsciiLine(Util.java:316)
03-12 19:27:35.486 2703-2789/com.henggu.voicecontrol W/System.err:     at com.android.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:308)
03-12 19:27:35.486 2703-2789/com.henggu.voicecontrol W/System.err:     at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:135)
03-12 19:27:35.486 2703-2789/com.henggu.voicecontrol W/System.err:     at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:644)
03-12 19:27:35.486 2703-2789/com.henggu.voicecontrol W/System.err:     at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:347)
03-12 19:27:35.486 2703-2789/com.henggu.voicecontrol W/System.err:     at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296)
03-12 19:27:35.486 2703-2789/com.henggu.voicecontrol W/System.err:     at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:179)
03-12 19:27:35.486 2703-2789/com.henggu.voicecontrol W/System.err:     at com.baidu.speech.core.BDSHttpRequestMaker.readData(Unknown Source)
03-12 19:27:35.486 2703-2789/com.henggu.voicecontrol W/System.err:     at dalvik.system.NativeStart.run(Native Method)
03-12 19:27:35.593 2703-3186/com.henggu.voicecontrol I/MicrophoneServer: audio mills is 0
03-12 19:27:35.596 2703-3186/com.henggu.voicecontrol W/System.err: java.util.concurrent.ExecutionException: java.net.SocketException: sendto failed: EPIPE (Broken pipe)
03-12 19:27:35.596 2703-3186/com.henggu.voicecontrol W/System.err:     at java.util.concurrent.FutureTask.report(FutureTask.java:93)
03-12 19:27:35.597 2703-3186/com.henggu.voicecontrol W/System.err:     at java.util.concurrent.FutureTask.get(FutureTask.java:177)
03-12 19:27:35.597 2703-3186/com.henggu.voicecontrol W/System.err:     at com.baidu.speech.audio.MicrophoneServer.run(Unknown Source)
03-12 19:27:35.597 2703-3186/com.henggu.voicecontrol W/System.err:     at java.lang.Thread.run(Thread.java:841)
03-12 19:27:35.597 2703-3186/com.henggu.voicecontrol W/System.err: Caused by: java.net.SocketException: sendto failed: EPIPE (Broken pipe)
03-12 19:27:35.597 2703-3186/com.henggu.voicecontrol W/System.err:     at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:499)
03-12 19:27:35.598 2703-3186/com.henggu.voicecontrol W/System.err:     at libcore.io.IoBridge.sendto(IoBridge.java:468)
03-12 19:27:35.598 2703-3186/com.henggu.voicecontrol W/System.err:     at java.net.PlainSocketImpl.write(PlainSocketImpl.java:507)
03-12 19:27:35.598 2703-3186/com.henggu.voicecontrol W/System.err:     at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
03-12 19:27:35.598 2703-3186/com.henggu.voicecontrol W/System.err:     at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:269)
03-12 19:27:35.598 2703-3186/com.henggu.voicecontrol W/System.err:     at com.baidu.speech.audio.MicrophoneServer$2.call(Unknown Source)
03-12 19:27:35.598 2703-3186/com.henggu.voicecontrol W/System.err:     at com.baidu.speech.audio.MicrophoneServer$2.call(Unknown Source)
03-12 19:27:35.598 2703-3186/com.henggu.voicecontrol W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
03-12 19:27:35.598 2703-3186/com.henggu.voicecontrol W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
03-12 19:27:35.598 2703-3186/com.henggu.voicecontrol W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
03-12 19:27:35.598 2703-3186/com.henggu.voicecontrol W/System.err: ... 1 more
03-12 19:27:35.599 2703-3186/com.henggu.voicecontrol W/System.err: Caused by: libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)
03-12 19:27:35.599 2703-3186/com.henggu.voicecontrol W/System.err:     at libcore.io.Posix.sendtoBytes(Native Method)
03-12 19:27:35.599 2703-3186/com.henggu.voicecontrol W/System.err:     at libcore.io.Posix.sendto(Posix.java:156)
03-12 19:27:35.599 2703-3186/com.henggu.voicecontrol W/System.err:     at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)
03-12 19:27:35.600 2703-3186/com.henggu.voicecontrol W/System.err:     at libcore.io.IoBridge.sendto(IoBridge.java:466)
03-12 19:27:35.600 2703-3186/com.henggu.voicecontrol W/System.err: ... 9 more
03-12 19:27:35.721 1417-1417/? V/AudioPolicyManagerBase: stopInput() input 168
03-12 19:27:35.723 1417-2568/? V/AudioPolicyManagerBase: releaseInput() 168
03-12 19:27:35.733 1417-2568/? V/AudioPolicyManagerBase: releaseInput() exit
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: stopOutput() output 2, stream 1, session 166
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: changeRefCount() stream 1, count 0
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: getNewDevice() selected device 0
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: setOutputDevice() output 2 device 0000 delayMs 86
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: setOutputDevice() prevDevice 0002
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 0, device 2
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 1, device 2
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 2, device 2
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 2, device 2
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 3, device 2
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:36.484 1417-1913/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 0, device 2
03-12 19:27:36.485 1417-1913/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 4, device 2
03-12 19:27:36.485 1417-1913/? V/AudioPolicyManagerBase: FORCE_none: AudioPolicyManagerBase.cpp
03-12 19:27:36.485 1417-1913/? V/AudioPolicyManagerBase: getDeviceForStrategy() strategy 5, device 2
03-12 19:27:36.485 1417-1913/? V/AudioPolicyManagerBase: setOutputDevice() setting same device 0000 or null device for output 2
03-12 19:27:37.680 2240-2639/com.hisilicon.android.hiRMService I/HiRMService:  ***** changeStats = 0
03-12 19:27:40.606 2703-3180/com.henggu.voicecontrol W/System.err: java.net.SocketException: Socket closed
03-12 19:27:40.606 2703-3180/com.henggu.voicecontrol W/System.err:     at libcore.io.Posix.accept(Native Method)
03-12 19:27:40.606 2703-3180/com.henggu.voicecontrol W/System.err:     at libcore.io.BlockGuardOs.accept(BlockGuardOs.java:55)
03-12 19:27:40.606 2703-3180/com.henggu.voicecontrol W/System.err:     at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:98)
03-12 19:27:40.606 2703-3180/com.henggu.voicecontrol W/System.err:     at java.net.ServerSocket.implAccept(ServerSocket.java:203)
03-12 19:27:40.606 2703-3180/com.henggu.voicecontrol W/System.err:     at java.net.ServerSocket.accept(ServerSocket.java:128)
03-12 19:27:40.606 2703-3180/com.henggu.voicecontrol W/System.err:     at com.baidu.speech.audio.MicrophoneServer$1.run(Unknown Source)
03-12 19:27:42.694 2240-2639/com.hisilicon.android.hiRMService I/HiRMService:  ***** changeStats = 0

 

收藏
点赞
0
个赞
共16条回复 最后由喀什假毕业证s回复于2018-08-17 00:39
#16fujiayi1984回复于2018-08-02

运行时 getApplicationInfo().nativeLibraryDir 目录下查看是否有完整so文件。

0
#15luwei35910回复于2018-07-31

当时没有解决 这个肯定不是简单的配置问题代码问题 大家可以试下楼上的方法。

0
#14阿萨德去23123回复于2018-07-04

我也同样遇到这样的问题,请问有解决方法了吗?

0
#13B10231张封回复于2018-07-04

我也碰到同样的问题,请问解决了么?

0
#12yuanfen4062回复于2018-05-28
#11 Leautolink回复
我也同样遇到这样的问题,请问有解决方法了吗?

将so库解压出来。然后编译的时候不要加@。最后加一个32平台的编译选项。我用的是v7a的包。

0
#11Leautolink回复于2018-05-16

我也同样遇到这样的问题,请问有解决方法了吗?

0
#10yuanfen4062回复于2018-04-27

我也遇到了同样的问题。VAD is not available。请问有解决方法了吗?

0
#9droimobi回复于2018-04-19

个人觉得是语音识别so库的访问方式有问题,我的apk集成了语音识别和语音合成,语音识别访问出错,语音合成是好的。我解决的办法,直接把so文件copy出来,

OCAL_MULTILIB := both
LOCAL_PREBUILT_JNI_LIBS_arm := $(subst $(LOCAL_PATH)/,,$(wildcard $(LOCAL_PATH)/lib/armeabi-v7a/*.so))
LOCAL_PREBUILT_JNI_LIBS_arm64 := $(subst $(LOCAL_PATH)/,,$(wildcard $(LOCAL_PATH)/lib/arm64-v8a/*.so))

0
#8fujiayi1984回复于2018-04-19

识别的dnn.so是分开加载的

将so复制到/system/app/FreemeTranslator/lib/arm64

0
#7droimobi回复于2018-04-18
#5 fujiayi1984回复
getApplicationInfo().nativeLibraryDir 打印语句和结果完整地贴下
展开

这个目录下是空的,但是我的apk同时集合了语音合成sdk,可以正常使用,为啥就语音识别不行?

/system/app/FreemeTranslator/lib/arm64

 

还有 我把官方的demo,直接集成也是一样缺少so库为啥?

0
#6droimobi回复于2018-04-18

这个目录下是空的,但是我的apk同时集合了语音合成sdk,可以正常使用,为啥就语音识别不行?

还有 我把官方的demo,直接集成也是一样缺少so库为啥?

0
#5fujiayi1984回复于2018-03-13
#4 fujiayi1984回复
将我们demo作为系统app试试

getApplicationInfo().nativeLibraryDir 打印语句和结果完整地贴下

0
#4fujiayi1984回复于2018-03-13
#3 luwei35910回复
该字段打印的是 /vender/lib /system/lib 尝试过两个目录都放上那5个so 问题依旧。 其他库也有依赖 并无异常 貌似就vad库有问题。
展开

将我们demo作为系统app试试

0
#3luwei35910回复于2018-03-13
#2 fujiayi1984回复
看下最后一句: 将 app/src/main/jniLibs 下armeabi等5个目录,复制到您的项目的同名目录中。 如与第三方库集成,至少要保留armeabi目录。如第三方库有7个架构目录,比语音识别SDK多出2个目录 mips和mips64,请将mips和mips64目录删除,剩下5个同名目录合并。 如第三方库仅有armeabi这一个目录,请将语音识别SDK的额外4个目录如armeabi-v7a删除,合并armeabi目录下的so。 即目录取交集,so文件不可随意更改所属目录。 打包成apk文件,按照zip格式解压出libs目录可以验证。 运行时 getApplicationInfo().nativeLibraryDir 目录下查看是否有完整so文件。
展开

该字段打印的是 /vender/lib /system/lib

尝试过两个目录都放上那5个so 问题依旧。

其他库也有依赖 并无异常 貌似就vad库有问题。

0
#2fujiayi1984回复于2018-03-13

看下最后一句:

将 app/src/main/jniLibs 下armeabi等5个目录,复制到您的项目的同名目录中。
如与第三方库集成,至少要保留armeabi目录。如第三方库有7个架构目录,比语音识别SDK多出2个目录 mips和mips64,请将mips和mips64目录删除,剩下5个同名目录合并。
如第三方库仅有armeabi这一个目录,请将语音识别SDK的额外4个目录如armeabi-v7a删除,合并armeabi目录下的so。 即目录取交集,so文件不可随意更改所属目录。
打包成apk文件,按照zip格式解压出libs目录可以验证。
运行时 getApplicationInfo().nativeLibraryDir 目录下查看是否有完整so文件。

0
TOP
切换版块