You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Google Speech API/How do I extend the stream duration? #807
I had tried grpc/transcribe_streaming.py code. It seems really cool.
It will ended after 65 seconds.
"Exceeded maximum allowed stream duration of 65 seconds."
I had tried to modify the "DEADLINE_SECS" for more time but not working.
Is there anyone know how to extend the time?
From some discussion in #517, I wrote another sample in the minute_workaround branch that restarts the stream at appropriate times, that you might find helpful if you need to stream audio for more than a minute.
@jerjou I gave a well deserved thumbs up but the link seems to be broken, is there a new link? Incidentally, is possible that this indicative more that we may be going about something the wrong way?
With transcribe_streaming_mic I was getting this error: google.api_core.exceptions.OutOfRange: 400 Exceeded maximum allowed stream duration of 65 seconds.
With transcribe_streaming_indefinite I am getting this error: google.api_core.exceptions.OutOfRange: 400 Audio data is being streamed too slow. Please stream audio data approximately at real time.
With transcribe_streaming_mic I was getting this error: google.api_core.exceptions.OutOfRange: 400 Exceeded maximum allowed stream duration of 65 seconds.
With transcribe_streaming_indefinite I am getting this error: google.api_core.exceptions.OutOfRange: 400 Audio data is being streamed too slow. Please stream audio data approximately at real time.
@NoTiger Did you find an answer? The latest API is still throwing this exception
Forgive me if I cannot provide a satisfactory answer. It has been some time. I remember the solution is on this thread. Something about infinite streaming. I check this thread again for you. The link seems broken. Perhaps they close the thread.
Perhaps they already updated the api. If not, then try something like calling the function again for the same socket stream. And kept the last result string in an array. Good luck.
Activity
theacodes commentedon Feb 15, 2017
@jerjou @gguuss
jerjou commentedon Feb 15, 2017
Hello!
The streaming API is currently limited to 1 minute of audio.
From some discussion in #517, I wrote another sample in the minute_workaround branch that restarts the stream at appropriate times, that you might find helpful if you need to stream audio for more than a minute.
hack-r commentedon Feb 25, 2018
@jerjou I gave a well deserved thumbs up but the link seems to be broken, is there a new link? Incidentally, is possible that this indicative more that we may be going about something the wrong way?
ttodua commentedon Mar 4, 2018
Seems talking about https://github.com/GoogleCloudPlatform/python-docs-samples/blob/speech-continuous/speech/cloud-client/transcribe_streaming_indefinite.py, but i wanted for c#... thanks anyway
eyaler commentedon May 11, 2018
with transcribe_streaming_indefinite i still get:
google.api_core.exceptions.OutOfRange: 400 Exceeded maximum allowed stream duration of 65 seconds.
SamuelHill commentedon May 21, 2018
With transcribe_streaming_mic I was getting this error:
google.api_core.exceptions.OutOfRange: 400 Exceeded maximum allowed stream duration of 65 seconds.With transcribe_streaming_indefinite I am getting this error:
google.api_core.exceptions.OutOfRange: 400 Audio data is being streamed too slow. Please stream audio data approximately at real time.wangejay commentedon Dec 3, 2018
I wrote another sample to transcribe always. LINK
Catch the except first:
try:
listen_print_loop(responses)
except Exception as exception:
print("Excption handle : Exceeded maximum allowed stream duration of 65 seconds")
and the Run Infinite loop
tusharkgerg commentedon Nov 10, 2019
@SamuelHill were you able to fix this?
pauloesteban commentedon Feb 26, 2020
Catching exceptions every 5 minutes is not optimal, but it works.
ttodua commentedon Feb 26, 2020
new apis from 2019 I no longer need 65 seconds, as it continiously works.
yeh-hsuan-ting commentedon Mar 19, 2020
May I know which new api you are refering to ?
arliber commentedon Nov 23, 2020
@NoTiger Did you find an answer? The latest API is still throwing this exception
yeh-hsuan-ting commentedon Nov 23, 2020
Forgive me if I cannot provide a satisfactory answer. It has been some time. I remember the solution is on this thread. Something about infinite streaming. I check this thread again for you. The link seems broken. Perhaps they close the thread.
P.S. I wrote in python.
I think since they cloud the solution example https://github.com/GoogleCloudPlatform/python-docs-samples/blob/speech-continuous/speech/cloud-client/transcribe_streaming_indefinite.py
Perhaps they already updated the api. If not, then try something like calling the function again for the same socket stream. And kept the last result string in an array. Good luck.
chore(deps): update dependency tqdm to v4.66.5 (#807)