RecognizerIntent gives error after latest Google Search update

偶尔善良 提交于 2020-01-14 04:12:59

问题


I have implemented a continous speech recognizer using SpeechRecognizer. RecognitionListener generally goes to ERROR_NETWORK (Error no 2) after onBeginningOfSpeech. This occurs not every time but many times. This behaviour started since last update of Google 4.1.24.1672412.arm update (12 January 2015)

protected class SpeechRecognitionListener implements RecognitionListener
{
    public void onBeginningOfSpeech()
    {
     }
    public void onError(int error)
    {
        if (mIsStreamSolo)
        {  // CAudioLibrary.unmute();
            mIsStreamSolo = false;
        }

        if(error == SpeechRecognizer.ERROR_NETWORK||error == SpeechRecognizer.ERROR_SERVER)
        {

.....

I have examined logcat and found out that it gives many errors like this: It is not my device specific, it gives the same error on my users devices also. Is there a problem on google site ? If I revert google update, it works without giving these errors. Thank you in advance.

01-15 14:36:48.656    3012-3012/? D/STATUSBAR-NetworkController﹕
onDataActivity: direction=2 01-15 14:36:48.656    3012-3012/?
D/STATUSBAR-NetworkController﹕ refreshSignalCluster -
setNWBoosterIndicators(false) 01-15 14:36:48.656    3012-3012/?
D/STATUSBAR-NetworkController﹕ refreshSignalCluster: data=2 bt=false
01-15 14:36:48.691  32404-32409/? D/dalvikvm﹕ GC_CONCURRENT freed
384K, 25% free 10740K/14260K, paused 10ms+3ms, total 40ms 01-15
14:36:48.871   5732-13019/? W/JavaNetConnection﹕ Failed to get
connection status.
    java.io.FileNotFoundException: https://www.google.com/m/voice-search/down?pair=6239918a-dc45-4eea-ac6f-b9bf8de57ced
            at kxb.getInputStream(PG:228)
            at kxa.getInputStream(PG:210)
            at kxc.getInputStream(PG:25)
            at cla.Gj(PG:256)
            at dzz.Gj(PG:26)
            at cla.Gi(PG:240)
            at cla.disconnect(PG:132)
            at clb.b(PG:110)
            at clb.a(PG:66)
            at dzb.a(PG:197)
            at cqj.HS(PG:529)
            at cqi.run(PG:314) 01-15 14:36:48.871   5732-13019/? W/S3NetworkUtils﹕ [Download] response code: 400, internal error
header: -74061 01-15 14:36:49.071   5732-13104/? W/JavaNetConnection﹕
Failed to get connection status.
    java.io.FileNotFoundException: https://www.google.com/m/voice-search/down?pair=af1df3dc-08ac-45fd-bb30-eee3393bcb9c
            at kxb.getInputStream(PG:228)
            at kxa.getInputStream(PG:210)
            at kxc.getInputStream(PG:25)
            at cla.Gj(PG:256)
            at dzz.Gj(PG:26)
            at cla.Gi(PG:240)
            at cla.disconnect(PG:132)
            at clb.b(PG:110)
            at clb.a(PG:66)
            at dzb.a(PG:197)
            at cqj.HS(PG:529)
            at cqi.run(PG:314) 01-15 14:36:49.071   5732-13104/? W/S3NetworkUtils﹕ [Download] response code: 400, internal error

Also, I have noticed following lines:

01-15 14:36:55.556 5732-6800/? W/EventLogger﹕ recordGsaError eyd: tr-TR at hdv.a(PG:121) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at fid.run(PG:102) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265) 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:841) 01-15 14:36:55.556 5732-6800/? W/ErrorProcessor﹕ onFatalError, ignoring error from engine(1): eyd: tr-TR 01-15 14:36:55.556 5732-6800/? W/EventLogger﹕ recordGsaError eyb: GsaErrorCode: 458756, engine: 1 at hdv.a(PG:126) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at fid.run(PG:102) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265) 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:841) 01-15 14:36:55.556 5732-6800/? W/DefaultRecognitionState﹕ Repeated error from secondary engine. 01-15 14:36:55.556 5732-6800/? W/ErrorProcessor﹕ onFatalError, ignoring error from engine(1): eyb: GsaErrorCode: 458756, engine: 1

来源:https://stackoverflow.com/questions/27964043/recognizerintent-gives-error-after-latest-google-search-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!