下载Android SDK DEMO,编译成功运行,点击"点击说话"按钮后,无论说什么都显示"录音中",过一阵子就Toast提示"识别失败",手机为红米 3S
07-11 14:32:50.215 25823-25823/com.baidu.duer.dcs I/Timeline: Timeline: Activity_launch_request time:17973450
07-11 14:32:50.235 25823-25823/com.baidu.duer.dcs I/ViewRootImpl: CPU Rendering VSync enable = true
07-11 14:32:50.325 25823-25909/com.baidu.duer.dcs D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524290
07-11 14:32:50.325 25823-25823/com.baidu.duer.dcs D/cr_Ime: [InputMethodManagerWrapper.java:30] Constructor
07-11 14:32:50.325 25823-25823/com.baidu.duer.dcs W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
07-11 14:32:50.335 25823-25823/com.baidu.duer.dcs D/cr_Ime: [InputMethodManagerWrapper.java:59] isActive: false
07-11 14:32:50.335 25823-25823/com.baidu.duer.dcs D/EgretLoader: EgretLoader(Context context)
07-11 14:32:50.335 25823-25823/com.baidu.duer.dcs D/EgretLoader: The context is not activity
07-11 14:32:50.345 25823-25823/com.baidu.duer.dcs I/cr_Ime: ImeThread is not enabled.
07-11 14:32:50.365 25823-25823/com.baidu.duer.dcs D/DCS-OkHttpRequestImpl: doGetDirectivesAsync
07-11 14:32:50.365 25823-25823/com.baidu.duer.dcs E/MediaPlayer-JNI: QCMediaPlayer mediaplayer NOT present
07-11 14:32:50.365 25823-25922/com.baidu.duer.dcs D/DCS-HttpLog: request: GET [https://dueros-h2.baidu.com/dcs/v1/directives] null
Content-Type: multipart/form-data boundary=dumi-boundory
dueros-device-id: ffffffff-e76f-1bc0-0000-00001aff3d52
debug: 0
Authorization: Bearer 23.c9b015417b17dfa5836d56b14b760786.2592000.1502339287.3332611192-9872095
07-11 14:32:50.375 25823-25823/com.baidu.duer.dcs E/MediaPlayer-JNI: QCMediaPlayer mediaplayer NOT present
07-11 14:32:50.375 25823-25823/com.baidu.duer.dcs E/MediaPlayer-JNI: QCMediaPlayer mediaplayer NOT present
07-11 14:32:50.385 25823-25823/com.baidu.duer.dcs I/ViewRootImpl: CPU Rendering VSync enable = true
07-11 14:32:50.395 25823-25823/com.baidu.duer.dcs D/ActivityThreadInjector: clearCachedDrawables.
07-11 14:32:50.425 25823-25823/com.baidu.duer.dcs D/DCS-DcsClient: onError,
okhttp3.internal.http2.StreamResetException: stream was reset: CANCEL
at okhttp3.internal.http2.Http2Stream.takeResponseHeaders(Http2Stream.java:153)
at okhttp3.internal.http2.Http2Codec.readResponseHeaders(Http2Codec.java:120)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:75)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at com.baidu.duer.dcs.http.intercepter.LoggingInterceptor.intercept(LoggingInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
07-11 14:32:50.435 25823-25823/com.baidu.duer.dcs D/DCS-DcsClient: getDirectives onFailed
07-11 14:32:50.435 25823-25823/com.baidu.duer.dcs D/DCS-DcsFramework: onUnconnected
07-11 14:32:50.435 25823-25823/com.baidu.duer.dcs W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 25823
07-11 14:32:50.435 25823-25823/com.baidu.duer.dcs D/cr_Ime: [InputMethodManagerWrapper.java:59] isActive: false
07-11 14:32:50.465 25823-25823/com.baidu.duer.dcs D/DCS-OkHttpRequestImpl: doPostEventStringAsync-bodyJson:{"event":{"header":{"name":"LinkClicked","namespace":"ai.dueros.device_interface.screen","messageId":"7bc34f9a-3c6e-455e-8f59-48b434c35bb2"},"payload":{"url":"about:blank"}}}
07-11 14:32:50.465 25823-27624/com.baidu.duer.dcs D/DCS-HttpLog: request: POST [https://dueros-h2.baidu.com/dcs/v1/events] null
Content-Type: multipart/form-data boundary=dumi-boundory
dueros-device-id: ffffffff-e76f-1bc0-0000-00001aff3d52
debug: 0
Authorization: Bearer 23.c9b015417b17dfa5836d56b14b760786.2592000.1502339287.3332611192-9872095
07-11 14:32:50.515 25823-25823/com.baidu.duer.dcs I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@16db22fb time:17973755
07-11 14:32:51.045 25823-25922/com.baidu.duer.dcs D/DCS-HttpLog: response: 200 [https://dueros-h2.baidu.com/dcs/v1/directives] 671.7ms
content-type: multipart/related; boundary=___dumi_avs_xuejuntao___; type=application/json
date: Tue, 11 Jul 2017 06:32:50 GMT
remote-server: 10.123.216.42:8230
x-powered-by: Express
07-11 14:32:51.045 25823-27624/com.baidu.duer.dcs D/DCS-HttpLog: response: 204 [https://dueros-h2.baidu.com/dcs/v1/events] 574.3ms
content-type: multipart/form-data; boundary=___dumi_avs_xuejuntao___
date: Tue, 11 Jul 2017 06:32:50 GMT
x-powered-by: Express
07-11 14:32:51.045 25823-25823/com.baidu.duer.dcs D/DCS-ResponseCallback: onResponse:200
07-11 14:32:51.045 25823-25823/com.baidu.duer.dcs D/DCS-DcsClient: onResponse OK ,https://dueros-h2.baidu.com/dcs/v1/directives
07-11 14:32:51.045 25823-25823/com.baidu.duer.dcs D/DCS-DcsClient: onResponse code ,200
07-11 14:32:51.045 25823-25823/com.baidu.duer.dcs D/DCS-DcsClient: getDirectives onSucceed
07-11 14:32:51.055 25823-25823/com.baidu.duer.dcs D/DCS-DcsFramework: onConnected
07-11 14:32:51.055 25823-25823/com.baidu.duer.dcs D/DCS-OkHttpRequestImpl: doPostEventStringAsync-bodyJson:{"clientContext":[{"header":{"name":"PlaybackState","namespace":"ai.dueros.device_interface.audio_player"},"payload":{"offsetInMilliseconds":0,"playerActivity":"FINISHED","token":""}},{"header":{"name":"AlertsState","namespace":"ai.dueros.device_interface.alerts"},"payload":{"activeAlerts":[],"allAlerts":[]}},{"header":{"name":"VolumeState","namespace":"ai.dueros.device_interface.speaker_controller"},"payload":{"muted":false,"volume":80}},{"header":{"name":"SpeechState","namespace":"ai.dueros.device_interface.voice_output"},"payload":{"offsetInMilliseconds":0,"playerActivity":"FINISHED","token":""}}],"event":{"header":{"name":"SynchronizeState","namespace":"ai.dueros.device_interface.system","messageId":"ccf5f338-6619-4e9e-b842-46ef8e157c41"},"payload":{}}}
07-11 14:32:51.055 25823-25823/com.baidu.duer.dcs D/DCS-ResponseCallback: onResponse:204
07-11 14:32:51.055 25823-27624/com.baidu.duer.dcs D/DCS-HttpLog: request: POST [https://dueros-h2.baidu.com/dcs/v1/events] null
Content-Type: multipart/form-data boundary=dumi-boundory
dueros-device-id: ffffffff-e76f-1bc0-0000-00001aff3d52
debug: 0
Authorization: Bearer 23.c9b015417b17dfa5836d56b14b760786.2592000.1502339287.3332611192-9872095
07-11 14:32:51.065 25823-25823/com.baidu.duer.dcs D/DCS-DcsClient: onResponse OK ,https://dueros-h2.baidu.com/dcs/v1/events
07-11 14:32:51.065 25823-25823/com.baidu.duer.dcs D/DCS-DcsClient: onResponse code ,204
07-11 14:32:51.555 25823-27624/com.baidu.duer.dcs D/DCS-HttpLog: response: 204 [https://dueros-h2.baidu.com/dcs/v1/events] 492.1ms
content-type: multipart/form-data; boundary=___dumi_avs_xuejuntao___
date: Tue, 11 Jul 2017 06:32:51 GMT
x-powered-by: Express
07-11 14:32:51.555 25823-25823/com.baidu.duer.dcs D/DCS-ResponseCallback: onResponse:204
07-11 14:32:51.555 25823-25823/com.baidu.duer.dcs D/DCS-DcsClient: onResponse OK ,https://dueros-h2.baidu.com/dcs/v1/events
07-11 14:32:51.555 25823-25823/com.baidu.duer.dcs D/DCS-DcsClient: onResponse code ,204
07-11 14:33:02.085 25823-25823/com.baidu.duer.dcs D/DCS-BaseMultiChannelMediaPlayer: ChannelMediaPlayer-setActive-isActive:true
07-11 14:33:02.085 25823-25823/com.baidu.duer.dcs D/DCS-BaseMultiChannelMediaPlayer: ChannelMediaPlayer-stop-channelName:dialog
07-11 14:33:02.095 25823-25823/com.baidu.duer.dcs E/MediaPlayer: stop called in state 1
07-11 14:33:02.095 25823-25823/com.baidu.duer.dcs E/MediaPlayer: error (-38, 0)
07-11 14:33:02.095 25823-25823/com.baidu.duer.dcs D/DCS-BaseMultiChannelMediaPlayer: ListenerProxy onStopped del:dialog
07-11 14:33:02.095 25823-25823/com.baidu.duer.dcs D/DCS-BaseMultiChannelMediaPlayer: ListenerProxy onStopped after del :0
07-11 14:33:02.095 25823-25823/com.baidu.duer.dcs D/DCS-OkHttpRequestImpl: doPostEventMultipartAsync-bodyJson:{"clientContext":[{"header":{"name":"PlaybackState","namespace":"ai.dueros.device_interface.audio_player"},"payload":{"offsetInMilliseconds":0,"playerActivity":"FINISHED","token":""}},{"header":{"name":"AlertsState","namespace":"ai.dueros.device_interface.alerts"},"payload":{"activeAlerts":[],"allAlerts":[]}},{"header":{"name":"VolumeState","namespace":"ai.dueros.device_interface.speaker_controller"},"payload":{"muted":false,"volume":80}},{"header":{"name":"SpeechState","namespace":"ai.dueros.device_interface.voice_output"},"payload":{"offsetInMilliseconds":1,"playerActivity":"FINISHED","token":""}}],"event":{"header":{"name":"ListenStarted","namespace":"ai.dueros.device_interface.voice_input","messageId":"ea36d3ed-6f7e-42b4-87be-f5541db6232a","dialogRequestId":"e14d0691-3c5c-4c46-85c9-3a25cd1d152b"},"payload":{"format":"AUDIO_L16_RATE_16000_CHANNELS_1"}}}
07-11 14:33:02.105 25823-27624/com.baidu.duer.dcs D/DCS-HttpLog: request: POST [https://dueros-h2.baidu.com/dcs/v1/events] null
Content-Type: multipart/form-data boundary=dumi-boundory
dueros-device-id: ffffffff-e76f-1bc0-0000-00001aff3d52
debug: 0
Authorization: Bearer 23.c9b015417b17dfa5836d56b14b760786.2592000.1502339287.3332611192-9872095
07-11 14:33:02.105 25823-25823/com.baidu.duer.dcs D/DCS-DcsDemoActivity: onStartRecord
07-11 14:33:02.115 25823-25823/com.baidu.duer.dcs E/MediaPlayer: Error (-38,0)
07-11 14:33:02.115 25823-25823/com.baidu.duer.dcs D/DCS-MediaPlayerImpl: onError:-38, extra:0