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