-
Notifications
You must be signed in to change notification settings - Fork 6.6k
transcribe_streaming speech example does not respond after 10-30secs #530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am facing a similar issue too. I tried chanings the DEADLINE_SECS, hoping to get better results. But it just freezes. |
I just pushed a not-insignificant update to the streaming sample. Would you mind trying that, and seeing if that helps things? (it's not necessarily related, but might be) |
@jerjou As a quick answer, the commit 5fca324 still hangs after a few recognitions (or a few 10 seconds?) and needs to kill python. (on MacOS + built-in Microphone, Japanese recognition) @puneith Thanks, the analysis in #515 makes sense, I will investigate different RATE/CHUNK settings. BTW, I am now working on Japanese recognition |
Re: japanese vs englishHm... I took a clean repo, modified the language to be Hm.. some things for you to try:
Re: hanging after a few recognitions
MiscellanyI added |
By using an external (USB) microphone, the sample works better, while still stop responding sometimes. One thing I have found is, when BTW is |
I have working code now using the transcribe_streaming_thread.py version which was shared. I have not tried the OOB version of transcribe_streaming.py again to see if I cleared something else after you provided the threaded version. By the way, it was a little tricky to convert transcription strings into dictionaries which I pass to my DriveTo method that moves the robo-car according to voice commands. But it does work. The main puzzle to solve now is how to expand my overall control code without having to put everything inside the listen_transcribe_loop. How do I call the transcribe loop without getting stuck there? Suggestions? |
@thecloudist I would recommend you get the updated sample code since it has final fixes. re: How do I call the transcribe loop without getting stuck there? |
The queue idea is good but the way the transcribe_print_loop() was written, I cannot exit from that method until a terminal condition is reached such as 'quit' etc. I am going to have to break that method apart so I can just ask for transcription when my main code loop is ready to ask for it rather than having it looping all the time. The app is kind of an asynchronous command and control app for a robot car. Thanks! |
Regarding the recognition hanging issue, after dozens of trials, Due to running out of time to investigate, my workaround is to use |
Hello! Sorry for the long delay - the backend folks have confirmed that this is probably an issue on their end that they're actively working on. If you wouldn't mind providing a link to a sample of audio that stops transcribing after awhile, it'd help them in fixing the issue. Thanks! |
(Closing due to inactivity, feel free to comment and we'll re-open) |
i'm facing this issue today severely. The code isn't new, runs everyday for couple months. But today it's failing; not for all the files, rather some random, even smaller files. Please re-open this issue and check from your side. Application version
Executing code segment
Stacktrace after CTRL+C:
|
After a few successful streaming recognition, transcribe_streaming.py does not respond without any message, in many cases it hangs and requires to kill pyhton. Not quite clear why, but it seems that it occurs after 1-10 recognition or 10-30 secs.
Are there any way to investigate what is going on, e.g. to show logs/messages? Not clear it is because this sample code, or GCP speech service.
The text was updated successfully, but these errors were encountered: