Detecting silence in one track but not another?

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!

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.

Have a go with this. (1.76 KB)
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.

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!