Detecting silence in one track but not another?

Effects, Recipes, Interfacing with other software, etc.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
CalgaryBen
Posts: 3
Joined: Tue May 26, 2009 10:01 pm
Operating System: Please select

Detecting silence in one track but not another?

Post by CalgaryBen » Wed May 27, 2009 2:39 pm

What method(s) would be most recommended to detect silence on one mono track, but not another? Or on a stereo track, silence on one side but not the other?

The silence finder plug-in works relatively well -- I can split a stereo track, and independently detect silence on each side (using two different label tracks), and then visually compare the two label tracks. But, this is slow and laborious, especially with longer tracks (60 minutes) with many silent segments on both.

Here's the scenario: I have two mono audio tracks containing essentially the same audio -- one from the output of a baseline device ("golden" track with no audio drops), and one from a device which may sporadically drop anywhere from 0.03 to 0.4 seconds of audio throughout. When audio is dropped, it's usually abrupt (like making a selection in the timeline using Audacity and silencing it) rather than fading out and back in.

I tried inverting one track and adding the two together (thinking that I could "cancel out" audio that was the same, while highlighting events where the audio had dropped on one track), but since the audio is not truly identical in the digital sense, this approach did not work.

The type of audio content is varied (may contain music, dialogue, etc.), as it is actually the audio portion of random recordings from a cable TV set-top tuned to any channel. Why would I do this, you may ask? I'm simply trying to analyze the frequency and duration of audio drops introduced by certain devices which process the audio during its delivery, so being able to find drops easily would be beneficial.

I am extremely new to Nyquist, so unless canned code could be provided, I hope not to have to do any actual coding/scripting from scratch (although I've inspected and tried to understand some of the existing plug-ins to see if I could adapt them to my specific application -- to no avail).

Thanks very much to any responses!
Ben

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Detecting silence in one track but not another?

Post by steve » Fri May 29, 2009 5:51 pm

The "silence" that you want to detect - how silent is it?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

CalgaryBen
Posts: 3
Joined: Tue May 26, 2009 10:01 pm
Operating System: Please select

Re: Detecting silence in one track but not another?

Post by CalgaryBen » Fri May 29, 2009 7:04 pm

stevethefiddle wrote:The "silence" that you want to detect - how silent is it?
I can find them using the Silence Finder with a "Silence level" value of 50-51 dB.

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Detecting silence in one track but not another?

Post by steve » Sat May 30, 2009 12:56 pm

Have a go with this.
diffsilencefinder.ny.zip
(1.76 KiB) Downloaded 135 times
Download the attachment and unzip it into the Audacity plug-ins folder.
When you next start Audacity you will find an item in the Analyze menu called "Diff Silence Finder..."

It is based on the "Silence Finder" tool by Alex S. Brown but looks at both channels of a stereo track individually. If it finds silence in the left channel when there is not silence in the right channel it will be marked with a label. Obviously it requires a stereo track.
I've not added much in the way of comments, but if you want some information about how it works just ask.
Also there is no error checking, so if you try to apply it with invalid parameters or to an invalid track (for example a mono track) it will just fail or crash.

The marker in the label track is placed at the end of the detected silence.

I have tweaked some of the values which should make it better suit your purpose and I have tested it in Audacity 1.3.7
Let me know how you get on.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

CalgaryBen
Posts: 3
Joined: Tue May 26, 2009 10:01 pm
Operating System: Please select

Re: Detecting silence in one track but not another?

Post by CalgaryBen » Mon Jun 01, 2009 5:17 pm

stevethefiddle wrote:Have a go with this.
Let me know how you get on.
Thanks Steve! This is fantastic, and does exactly what I had in mind! Thanks for taking the time and effort to whip this up! Not only will it save me time in my efforts to analyze audio, it'll also serve well as a learning opportunity, so I appreciate it greatly!

Cheers,
Ben

Post Reply