Script for Removing silence?

jrazz wrote on 8/4/2009, 5:39 PM
I have a client who recorded several, several hours of conferences on a handheld recorder. It was set to record when audio was actually heard. What he wants to is remove "room noise" and just keep the voice.

Is there a script for Vegas or something in SoundForge that will allow one to remove portions of audio that are below a certain decibel level?

If not, do you know of any software that can achieve decent results?

j razz

Comments

Former user wrote on 8/4/2009, 6:58 PM
I would tackle this with a well tuned noise gate. Vegas and Forge have a gate plugin
However - depending on how bad the "room" is...it may sound a bit strange if gated too much.

Give it a whirl!

VP
jrazz wrote on 8/4/2009, 7:04 PM
He is actually needing something to remove these areas, not silence them. Instead of spending several hours going through each file and cutting out the room noise, he just needs a script or something that will automate this.

Basically: place audio on timeline- select <decibel range- run script and it ripples all events to close the gaps that were removed.

I don't know if that script exists, but it would be a good one to have :)

j razz
farss wrote on 8/4/2009, 8:04 PM
I've faced a similar challenge. SF kind of has this functionality but I ended up using a very simple program called Wavebreaker, worked a treat:

http://www.blazeaudio.com/products/wavebreaker.html

Sure cannot complain for the price. Thing is it only works with audio and it only splits the file on the silence but if you think outside the square it'd save a heck of a lot of time on this task.

Render out the audio track to a wav file, run that through wavebreaker and put the cut up wav files onto a new track butted end to end. Now you know where you need to trim sound and vision.

If you have SF then you might be able to use it's silence detection to return an audio file with markers to ease the task the same as Wavebreaker would do. I just found the silence detection in SF not as reliable as Wavebreaker plus I really only needed to split wav file from R2R tapes that were already mastered for vinyl ready for mp3 encoding.

Bob.
rs170a wrote on 8/4/2009, 8:15 PM
Sure cannot complain for the price.

Bob, you weren't kidding!!
I was expecting $50 or so but it's only $9.95.
That's an amazing price for what it does.
Thanks for the great tip on a great tool :-)

Mike
Steve Mann wrote on 8/4/2009, 10:56 PM
I already have a use for it - and since it gives you the time of the track start, it should be somewhat trivial to find the same point in your timeline.
jrazz wrote on 8/5/2009, 8:18 AM
Thanks guys. He doesn't have any video- just the audio. I will give him the link. I appreciate it.

j razz
Chienworks wrote on 8/5/2009, 12:29 PM
Scripting in Vegas & ACID can't handle this sort of task. Scripting automates things you can do with keypresses and mouse clicks, but it has no way of operating upon the contents of the events.

Consider it this way ... turn off thumbnails and wave forms. You now have a bunch of empty white rectangles on the timeline. Anything you can describe doing with those empty rectangles can be done with a script. You can script operations like "select all the white rectangles on track 4" or "apply this effect to all white rectangles longer than 8 seconds", for example. However, saying something like "find a spot where the waveform is silent ..." and you've hit a snag. The waveform is the content inside an event, not the event itself. Since scripting can't see or understand the content, it can't perform such an operation.

Now, if there were a plugin that could do that job for you, then you could have a script that says "for all the events on the audio track, use that plugin". This is something that is possible, because the script itself doesn't look inside those white rectangles. In this case though, it's really the plugin that matters, not how scripting would use it.

Hopefully this will give a more general idea of what simply cannot be accomplished with a script.
Grazie wrote on 8/5/2009, 10:07 PM
Ah! Kelso, what a fine explanation. This SHOULD be a sticky.

So, what I am understanding is that ALL we have are graphical reps of what is within the Audio or Video file - only a graphical representation. What NEEDS to be done is to get at the way that the representation was interpreted. interpolated and thusly generated. Once THAT could be done THEN and only THEN could we/SCS allow for scripting to be efficacious.

It's as if we are explaining to a visually impaired person the numbers that make up a RED or the numbers of a C sharp and its volume. What our chap now needs to know is how we arrived at those numbers. Once that could be achieved then we can intercede with manipulation OF those numbers to our own benefits - something along the lines of:

No Audio numbers could mean silence >> put a marker in here >> now between markers/regions cut this out >> close up the space created.

Hmmm... so graphical representations are only that, and nothing more. Well, I'd suggest we are almost there with the philosophy, now we need a level/platform to work through the implementation of it. Detail!

Grazie
farss wrote on 8/6/2009, 12:11 AM
Now I'm totally lost and that's saying something.
Maybe this is going to devolve into a profound discussion of Qualia although I hope not :)

Even if all a script had access to is only the graphical representation of the sound let's not forget that we can understand it (flat line = silence), therefore software can too. Nowhere near as easily as if we had access to the actual soundfile data or maybe not even that is true, after all the data could be encoded using any one of many compression schemes whereas Vegas already did that bit of hard work for us when it drew the waveform file.

Bob.

Grazie wrote on 8/6/2009, 12:24 AM
What I am saying is that as Vegas maps the Graphics (in your words, "Vegas already did that bit of hard work for us when it drew the waveform file."), it is doing it from something and somehow, and all that would be needed to be done would be to intercept that process and pipe off a conduit to THEN apply a script.

So, Bob, I truly DO believe you have understood me.

Grazie
farss wrote on 8/6/2009, 2:38 AM
"it is doing it from something and somehow, and all that would be needed to be done would be to intercept that process and pipe off a conduit to THEN apply a script"

Problem is Vegas only runs that process once, when it builds the peak files. One solution is to run the silence detection on the peak file itself. Other solution is to simply run it outside of Vegas and write the markers into a file.
Regardless, scripting is not the best way to crunch a lot of numbers, I can imagine the code would take a long time to run if written in a scripting language.
All said and done, Wavebreaker is almost free and gets the job done. For my needs with Vegas and in conjunction with Peachrock's Multirenderer it was very easy, very fast and even very profitable.
Just don't tell all these video guys, it can be much easier to make a buck without a camera, just our little secret, OK :)

Bob.
jabloomf1230 wrote on 8/6/2009, 6:39 PM
There is another option that might be helpful, if you are dealing with stereo. The Sony Vocal Eraser plugin that comes with Vegas 9 Pro, also has a mode to eliminate everything except the vocal.:

In "Remove vocal" mode, the vocal is suppressed, leaving the background accompaniment intact. With "Keep vocal only" selected, the accompaniment is suppressed in order to isolate the vocal.

It works pretty good, as long as the background noise is not entirely in the same frequency range as the vocal/speaking voice. Keep in mind, with this plugin, the vocal has to be at an identical level on both L & R tracks. I recently shot and edited a interview of a engineer on a construction barge and the plugin suppressed the compressor noise quite nicely. Most other vocal enhancers/noise reduction approaches tend to make the vocal sound either sound choppy or like telephone quality.

Another option arises when the background noise is more on one track than the other. You would be very lucky, if that was the case, though.

Chienworks wrote on 8/6/2009, 6:59 PM
I think what i was trying to say was that the script has no access to any data inside the event. My thought example started with turning off waveforms leaving an empty blank rectangle. This is what the script sees. So graphical representation or actual data aside, neither is available to the script.

There is one exception which is markers inside the media. But these are accessible because the user also has a keypress or mouse click operation that can be performed to get to the marker. The script that deals with event markers does so by using these features.

There is no mouse click or keypress that can be performed that does "position the cursor where the waveform drops below -XdB. Since this function doesn't exist, a script can't do it either.

So, what i mean about the waveforms is that the script is as "blind" as we are when we look at the empty rectangle. Even if we can see the graphical representation of the waveform by turning it back on, the script is still blind.
farss wrote on 8/7/2009, 12:53 AM
Understand.
What I'm thinking though is for this exercise couldn't the script read the media file itself, run the detect silence code and write markers back into the project or even write a sfk file.

I realise this means the script is processing the raw data, bypassing any FXs etc added in the project. In this instance I can't see that as being an issue.

Hm, the script could even run Wavebreaker, look at the length of the split .WAV files, use that to calculate the time between silences and from that work out where the silence markers belong.

Bob.
gary-orman wrote on 6/10/2017, 2:44 AM

I've been tearing my hair over this for years. I finally found the perfect solution:

Buy the Vegasaur Toolkit ($100, but you can get a free 30-day trial if you just need to do it once).

It's a two-stage operation:

  1. Select Silence Detector to create markers for the starts and ends of all the silent regions in the timeline
  2. Select Marker Tools to then delete the events defined by the markers (you might want to choose auto ripple to have a continuous stream with no silences).

This product was the prime reason why I bought Vegas Pro as opposed to Movie Studio. I didn't need any of the professional audio/video/editing features in Vegas Pro because Movie Studio does it all to my requirements. But Vegas Pro can incorporate SCRIPTS (and add-ins like Vegasaur).

Well worth the extra expense!