Reputation: 3993
Is there any way by which we can detect and remove silence from an audio file using GStreamer.
Currently, by using level
I am able to find the start and end time of silence present in the audio file but how do I remove this silence and produce an output which doesn't have silence in it. I tried using gst_element_seek
but no luck there.
Upvotes: 0
Views: 1257
Reputation: 2094
There is a removesilence element in gstreamer-plugins-bad, perhaps it is what you want.
Edit: adding example
gst-launch-1.0 autoaudiosrc ! audioconvert ! removesilence remove=true ! fakesink silent=false -v
This launch line will print data to the screen whenever removesilence output buffers, it will be capturing audio from the microphone of your system. It will only output audio when some noise is detected.
Upvotes: 2