androidvoice-recognitionspeech-to-textandroid-speech-apigoogle-cloud-speech

Google Cloud Speech API gives UNAVAILABLE: Channel in TRANSIENT_FAILURE state in Android


I have been using Google Cloud Speech API for a while. I am specifically following Google Speech Demo provided by google. It is working with very great efficiency in devices with version 5.0 and higher.

But when I run it in Android version lower than 5.0, then it always gives me

UNAVAILABLE: Channel in TRANSIENT_FAILURE state

I have searched it and found some canonical error codes for Google APIs, which specifies,

UNAVAILABLE The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff.

See the guidelines above for deciding between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE.

HTTP Mapping: 503 Service Unavailable

So does that mean that Cloud Speech Services are not supported for Android devices lower than Android 5.0 ? Is there any workaround this ?


Solution

  • I've looked through the Android example and couldn't see anywhere they are setting:

    ProviderInstaller.installIfNeeded(mContext);
    

    You can read about it here.

    If that solves the problem, you may have more to come, as I posted here a few days ago.