Low Latency Causes Disconnect #1
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: video/gst-plugin-vosk#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello! Giving this plugin a whirl and was curious about trying to acheive lower latency. When using default latency of 30s it seems to work fine. However if I go to anything lower the plugin runs for a bit, but then vosk eventually terminates the connection.
In browsing through the code it doesn't appear that the latency actually affects the configuration of the vosk server at all?
I've got debug logs if that might explain what's going on: https://gist.github.com/raytiley/c9f741093a78367a010606eba337a8ec
This is from the vosk server docker container.
The command i'm using is:
gst-launch-1.0 vosk_transcriber latency=5000 name=tc ! fakesink sync=true dump=true uridecodebin uri=file:///e:/content/dn.mp4 name=decode ! queue ! audioconvert ! tc.
Hey, thank you for the interest in this work!
The latency configuration only affects when the sinks elements of the GStreamer pipeline are expected to start receiving buffers (and how much delayed). Honestly, the Vosk websockets server is not very reliable. In order to use this in production I would recommend doing a more reliable implementation on the server side of things. The protocol of communication (websockets/payload) could continue to be the same though, so no changes would be necessary in the
vosk_transcriber
element.From the logs you shared, we can see the error:
Which points to some problem with the Vosk Server. Then on the server side what is interesting is this:
connection closed abnormally [internal]
. I guess would be nice to investigate what this "internal" means.. maybe there is a way to expose what is the actual error here.Hey @raytiley ,
I have looked more deep into this issue and it seems to only happen when running the pipeline using the
gst-launch-1.0
command. If you write a small application and use the plugin this problem does not happen. Of course the transcription will not come in time and the pipeline will give warnings that many buffers are being dropped, etc.. but it does not drop the connection.If you are looking for a working example to play around, try this https://github.com/rafaelcaricio/example-add-captions708/blob/vosk-local-transcription-demo/src/main.rs
I hope that helps.