Skip to content
← Back to activity

Public problem

Google Speech 400 Audio Timeout Error: Long duration elapsed without audio

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

I ran the transcribestreaminginfinite.py sample, left it running for 30 minutes, and got a 400 error: Audio Timeout Error: Long duration elapsed without audio. Audio should be sent close to real time. What does this mean?

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

That error is the API telling you the streaming session went quiet for too long. Streaming recognition expects audio to be sent continually, close to real time, so if your mic stream pauses or the sample just idles with no audio for a long stretch, the API times out the request. If you need always-on listening, you have to keep feeding audio and handle reconnects when it times out. If you do not actually need real time results, switch to one of the non-streaming methods, like short or long audio transcription, which do not have this requirement. Source: https://github.com/googleapis/python-speech/issues/209

Source: https://github.com/googleapis/python-speech/issues/209