-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Python] Speech recognizer stops continuous recognition eventually by itself #2760
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
This item has been open without activity for 19 days. Provide a comment on status and remove "update needed" label. |
There's a session stopped event in the log for session 53d8749ba2374f6aa21dbffd94a78192 that reported it had processed all the audio and was stopping. It should have raised a canceled event with an end of stream reason. |
Thank you for looking into this. Well, i never saw any canceled events in my logs, it always was a session stopped event. |
This item has been open without activity for 19 days. Provide a comment on status and remove "update needed" label. |
I use webm/opus on the web side, sending audio blocks every 180ms, using java sdk on the server side, and have filtered out the case where the length of byte[] is equal to 0. Even if PushAudioInputStream is not closed, EndOfStream events will still appear from time to time. AudioStreamFormat uses AudioStreamContainerFormat.ANY; what is the cause of this problem? ? |
Hello, a bit of context before the bug description:
I am trying to setup a python websocket server where clients (e.g. web based) can connect to and stream speech from the devices microphone. Because i want the speech data to be sent encoded as an OPUS stream from the client to the server, i am required to convert the stream to PCM.
For that, i am using gstreamer (as explained in the docs) and a PushAudioInputStream. As i am required to support numerous voice streams on a single server instance that may be running for a long time, i am testing with several opened browser windows streaming the microphone input for long periods of time.
IN ORDER TO ASSIST YOU, PLEASE PROVIDE THE FOLLOWING:
Speech SDK log taken from a run that exhibits the reported issue.
See instructions on how to take logs.
appended at the end
A stripped down, simplified version of your source code that exhibits the issue. Or, preferably, try to reproduce the problem with one of the public samples in this repository (or a minimally modified version of it), and share the code.
appended at the end
Describe the bug
On my local machine (in a docker container) i am able to transcribe tens of streams simultaneously for hours without any problems.
But when i deploy the image to an Azure App Service and run 10 streams concurrently, the session is stopped automatically after a time between 10-30 minutes. The session is not canceled as i assume it would happen in case of an error but it is stopped without giving the reason.
Based on the script, i am getting the following console output:
SESSION STOPPED SessionEventArgs(session_id=xyz)
To Reproduce
Upload a docker image with the script on azure app service (or maybe a device with limited cpu/memory resources?) and start multiple streams. Then wait and the stream should stop
Expected behavior
The continuous recognition should not stop until i directly tell the recognizer to do so using .stop_continuous_recognition(). I expect the recognition to work for hours.
Version of the Cognitive Services Speech SDK
azure-cognitiveservices-speech 1.42.0
Platform, Operating System, and Programming Language
python:3.13-slim
base imageAdditional context
n/a
The script:
The sdk's log:
As the log file is 500MB in size, i cut out the last 2000 lines and uploaded it on pastebin.
The text was updated successfully, but these errors were encountered: