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?
@jerjou @gguuss
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.
@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?
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
with transcribe_streaming_indefinite i still get:
google.api_core.exceptions.OutOfRange: 400 Exceeded maximum allowed stream duration of 65 seconds.
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.
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
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.
@SamuelHill were you able to fix this?
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
Catching exceptions every 5 minutes is not optimal, but it works.
new apis from 2019 I no longer need 65 seconds, as it continiously works.
new apis from 2019 I no longer need 65 seconds, as it continiously works.
May I know which new api you are refering to ?
@NoTiger Did you find an answer? The latest API is still throwing this exception
@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.
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.
Most helpful comment
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