GNOME Bugzilla – Bug 671954
removesilence: add a property to output buffer without timestamp gap
Last modified: 2018-11-03 13:11:11 UTC
Created attachment 209553 [details] [review] add a property to output buffer without timestamp gap Please review the attached patch, thanks
Created attachment 209588 [details] [review] Post bus message when silence is detected/finished Post bus message when silence is detected/finished, this allow another use case, please review this patch too, thanks Nicola
Created attachment 209590 [details] [review] small enhancement
maybe I could add a new property to enable/disable posting messages on bus, let me know what do you think about, thanks Nicola
Created attachment 209628 [details] [review] added a property to control bus msg
Created attachment 209653 [details] [review] new property to remove silence only after n consecutive silence frame this is the last property ... promise, this should cover all my use cases, please review
<drakkan1000> recently I did some work on removesilence plugin to make it suitable for my use cases https://bugzilla.gnome.org/show_bug.cgi?id=671954 what do you think about? Can this changes be merged? <ds> drakkan1000: could you deprecate the patches which are no longer valid? <drakkan1000> ds, the posted patch are all valid <drakkan1000> ds, they must be applied in the order I posted <drakkan1000> if you want I can make a single patch but each one add a different feature <ds> we have a standard property name for enabling/disabling bus messages. it's called "silent", which is, uh, unfortunate <drakkan1000> ds, ok I'll post a new patch renaming the property <ds> there was some talk about doing this differently in 0.11 <ds> drakkan1000: i'd like to see the silence cutting configuration to be in time, and a bit more flexible <ds> drakkan1000: I think of this sort of like a patch file: you want a certain amount of context, and want to merge hunks if they're too close together <drakkan1000> ds, ok I'll try to do what you ask, should be a matter to do sum the duration of each frame <ds> so a property that determines how much silence to prepend to a hunk, append to a hunk, and the minimum gap, i think would be the minimal set of properties <ds> and although I would want this to ultimately work with sample precision, frame precision is likely fine for now. if someone wants sample precision, they can do the hard work themselves <ds> (but make sure the API makes sense for sample precision) <ds> also, as a side comment, please don't abbreviate property names ("msgs") <drakkan1000> ds, thanks for your suggestions <ds> i'm still trying to decide about 'continuous-timestamp'. I think there's a better name out there, but 'squash' is the best I can think of, which fails the "better" criterium <ds> ahem, criterion
I want to keep track of this too: so if silence is _, then something like this: _________AAA______B_____C______ would get changed to .......__AAA__..__B__.__C__.... with . being removed audio <drakkan1000> ds, ok <ds> but B and C might be part of the same utterance, so you want to avoid the one-dot gap dunno, this might be getting more complicated than what people actually need for that kind of case er, "avoid removing the one-dot gap"
Created attachment 210569 [details] [review] add squash property
Created attachment 210570 [details] [review] add bus messages
Created attachment 210571 [details] [review] add silent property
Created attachment 210572 [details] [review] add mimimun silence time/minum silence buffers properties
Created attachment 213853 [details] [review] restore original behaviour if both the frame and time properties to detect silence are disabled
Created attachment 217726 [details] [review] 0.11 add squash property squash property for 0.11
Created attachment 217727 [details] [review] 0.11 add bus messages
Created attachment 217728 [details] [review] 0.11 add silent property
Created attachment 217729 [details] [review] 0.11 add minimum silence time/minimun silence buffers properties
added patchset against 0.11/1.0 please review, the patches can be tested with something like this (adding removing properties based on the test to perform): gst-launch-1.0 -v -m -t alsasrc ! audioconvert ! removesilence remove=true squash=false silent=false minimum-silence-buffers=10 minimum-silence-time=100000000 ! fakesink silent=true to simulate silence is enough to mute the capture device with the os volume control, Nicola
What's the status of this here?
the patch need to be tested/rebased to current git master, I used the 0.10 version I'm a bit busy now, I'll try to find some time the next weekend
Created attachment 323174 [details] [review] add squash property
Created attachment 323175 [details] [review] add bus messages
Created attachment 323176 [details] [review] add silent property
Created attachment 323177 [details] [review] add minimum silence time/buffers properties rebased against git master, please review
anything to do here? Are these patchs useful?
Created attachment 344247 [details] [review] new property for silence threshold an user asked for this some time ago, I hope someone can review, thanks!
ping
Hi, I find really useful the feature of being able to set a maximum silence time after which the output is effectively dropped. I think this is implemented in the following patch: https://bugzilla.gnome.org/attachment.cgi?id=323177&action=edit Is there any chance for that option to be added to mainstream?
these patchs is really useful. great work.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/63.