语音唤醒在Android7.0运行时的异常,开发环境Android studio
5623dfd 发布于2017-07 浏览:1487 回复:1
0
收藏

语音唤醒报出的异常 原因是为什么?: java.lang.Exception: #3, Audio recording error., file: 

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.EventManagerMic.createMicrophoneInputStream(EventManagerMic.java:176)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.EventManagerMic.send(EventManagerMic.java:98)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.EventManagerMic.send(EventManagerMic.java:65)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.EventManagerMessagePool$1.run(EventManagerMessagePool.java:46)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at android.os.Handler.handleCallback(Handler.java:751)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:95)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at android.os.Looper.loop(Looper.java:185)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at android.os.HandlerThread.run(HandlerThread.java:61)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err: Caused by: java.io.IOException: bad recorder, read(byte[]) can't read audio data 

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.MicrophoneInputStream$PrivateMicrophoneInputStream.(MicrophoneInputStream.java:181)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.MicrophoneInputStream.(MicrophoneInputStream.java:50)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.MicrophoneInputStream.(MicrophoneInputStream.java:45)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.MicrophoneInputStream.(MicrophoneInputStream.java:37)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.EventManagerMic.createMicrophoneInputStream(EventManagerMic.java:144)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:  ... 7 more

07-25 16:39:21.254 11971-11971/com.ctr_lcr.huanxing W/System.err: 第三代地方1

07-25 16:39:21.372 11971-11971/com.ctr_lcr.huanxing D/WakeUp: event: name=wp.exit, params={"desc":"success"}



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

5623dfd:

语音唤醒报出的异常 原因是为什么?: java.lang.Exception: #3, Audio recording error., file: 

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.EventManagerMic.createMicrophoneInputStream(EventManagerMic.java:176)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.EventManagerMic.send(EventManagerMic.java:98)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.EventManagerMic.send(EventManagerMic.java:65)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.EventManagerMessagePool$1.run(EventManagerMessagePool.java:46)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at android.os.Handler.handleCallback(Handler.java:751)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:95)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at android.os.Looper.loop(Looper.java:185)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at android.os.HandlerThread.run(HandlerThread.java:61)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err: Caused by: java.io.IOException: bad recorder, read(byte[]) can't read audio data 

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.MicrophoneInputStream$PrivateMicrophoneInputStream.(MicrophoneInputStream.java:181)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.MicrophoneInputStream.(MicrophoneInputStream.java:50)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.MicrophoneInputStream.(MicrophoneInputStream.java:45)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.MicrophoneInputStream.(MicrophoneInputStream.java:37)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:     at com.baidu.speech.EventManagerMic.createMicrophoneInputStream(EventManagerMic.java:144)

07-25 16:39:19.389 11971-12427/com.ctr_lcr.huanxing W/System.err:  ... 7 more

07-25 16:39:21.254 11971-11971/com.ctr_lcr.huanxing W/System.err: 第三代地方1

07-25 16:39:21.372 11971-11971/com.ctr_lcr.huanxing D/WakeUp: event: name=wp.exit, params={"desc":"success"}



回复5623dfd:请测试下我们的demo是否有此问题

0
TOP
切换版块