-
Notifications
You must be signed in to change notification settings - Fork 100
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
Stopping the pipeline mid-decoding #33
Comments
I don't think it's possible at the moment. In fact, I've struggled with this problem too. I think it one might need to make largish changes to the code to make it possible, and it is especially complicated with the threaded decoder. When you push EOS to the pipeline, it gets consumed after all the buffers that have been already pushed to the pipeline. Therefore, I actually cannot see how the pocketsphinx plugin could handle it better. I used the pocketsphinx plugin as a reference when creating the the Kaldi GStreamer plugins. |
I understand. About PocketSphinx, in my simple pipeline I do not fully understand yet the way buffers and events are consumed in Gstreamer, and especially why my workaround with the pulseaudio element works. Thank you for your answer. I will keep you updated if I find a way. |
Hello, Thanks for this gstreamer plugins! I trying to use this gstreamer plugins in my gstreamer python apps with "appsrc" method. In my case, I trying to use pyaudio to record the sound wave and decoding. |
Hello,
I am using Kaldi in a way similar to your gstreamer server, and this plugin is a great help.
My issue is when decoding a file, either by using a filesrc element or by pushing buffers in an appsrc element. I cannot find a way to stop the decoding before it has reached the end of the file.
I see in your decoder you commented various lines that I have tried without success:
Through chance I found a kind of workaround by using a tee element with on one side the asr decoder (without a fakesink) and on the other side a pulsesink. The pulsesink would receive the eos, throw an underflow warning and for some reason the asr element will stop as well. This however is not graceful at all and the server I want to run the service on doesn't have pulseaudio drivers. I believe this might also hinder performance.
I noted that this also happens with the other kaldi gstreamer plugin (gmmdecode) in the same way, whereas when using the pocketsphinx plugin, the behavior is as expected and pushing an eos event will stop the decoding.
My code is similar to the one you use in decoder2.py.
Would you know of a graceful way to stop the pipeline in order to have the decoder immediately available again?
The text was updated successfully, but these errors were encountered: