如何处理ERROR_RECOGNIZER_BUSY [英] How to handle ERROR_RECOGNIZER_BUSY

查看:300
本文介绍了如何处理ERROR_RECOGNIZER_BUSY的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的语音识别基于应用程序,我有时会收到ERROR_RECOGNIZER_BUSY。直观地看,这要求... 重试,对吧?

In my voice recognition based app, I sometimes receive ERROR_RECOGNIZER_BUSY. Intuitively, this calls for... retries, right?

现在的问题是,这个错误是非常无证,所以很明显,我有问题,也许更有经验的人在场上能够回答:

The problem is that this error is very undocumented, so obviously I have questions that perhaps someone more experienced in the field is able to answer:

  1. 在什么诱发了这样的错误?是吗 真的只有繁忙的服务器(在谷歌)? 或者这也可能在我的应用程序暗示一个错误?
  2. 请我必须明确地关闭/重新打开 重试前一个会议?
  3. 多久重试?每 1秒?每5秒?其他?
  1. What triggers such an error? Is it really only busy server (at Google)? or this could also hint at a bug in my app?
  2. Do I have to explicitly close/reopen a session before a retry?
  3. How often to retry? once every 1-second? every 5-seconds? Other?

您有经验的见解者居多。谢谢你。

Your experienced insights are most welcome. Thanks.

推荐答案

我不是100%肯定这一点,但因为它已经这么久以来你贴出来,我不妨给它一个镜头。 看来你正在做的事情错了code。正如评论者说,这将是有益的,如果你真正贴code即返回该错误。 然而,在源$ C ​​$ C为Android的语音识别服务,在这里找到:

I'm not 100% sure of this, however since it's been so long since you posted, I may as well give it a shot. It seems that you are doing something wrong in the code. As the commenter said, it would be helpful if you actually posted the code that is returning this error. However, in the source code for the Android speech recognition service found here:

<一个href="http://source-android.frandroid.com/frameworks/base/core/java/android/speech/RecognitionService.java" rel="nofollow">http://source-android.frandroid.com/frameworks/base/core/java/android/speech/RecognitionService.java 我们有一个叫做函数 dispatchStopListening 这似乎结束听的过程。然而,在它实际上结束了,有几个检查非法状态,其中包括这样的:

http://source-android.frandroid.com/frameworks/base/core/java/android/speech/RecognitionService.java we have a function called dispatchStopListening which seems to end the listening process. However, before it actually ends it, there are a few checks for illegal states, including this:

else if (mCurrentCallback.mListener.asBinder() != listener.asBinder()) {
            listener.onError(SpeechRecognizer.ERROR_RECOGNIZER_BUSY);
            Log.w(TAG, "stopListening called by other caller than startListening - ignoring");
        }

这似乎意味着,你正在试图通过一些其他人比你开始吧,这引起了这个错误,结束听的过程。 我希望这会有所帮助,但如果您发布的code这将是非常有益的。

This seems to imply that you are trying to end the listening process by some other guy than you started it with, which raises this error. I hope this helps, but it would be extremely beneficial if you posted the code.

这篇关于如何处理ERROR_RECOGNIZER_BUSY的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆