Comparing two supposedly identical tracks.

I know there is a way to check if two audio tracks are 100% identical. However, I don’t know that way.

Can anyone tell me how to do it? I have 2 supposedly identical AIFF tracks, and I want to compare them to the last bit to see if they truly are the same.

Import them both into Audacity. Apply the “Invert” effect to one of the tracks. Select both tracks, then from the “Tracks menu > Mix and Render”.
If the tracks were identical, the result will be silence. To check that it is absolute silence, select the full (mix) track, and open the “Amplify” effect. If the Amplify effect says that the “New Peak Amplitude” is “-infinity”, then the mix track is totally silent and the two imported files have identical audio.

While giving it little or no thought, I would import both of them, invert one and mix and render to a new track. If the new track is completely silent, then they’re the same.

But I know that doesn’t tell you about a match down to bit level and I also know it will miss a little due to the way digital audio works. I created a known, good, working matched track once that would not perfectly cancel. It also creates problems if they’re bit identical but they don’t start at the same time.

I also know that we’re sensitive to the parts of the post that you didn’t say. Like, “… see that they match so I can sue the pants off somebody in court.”


They are supposed to be literally the same file. I just want to compare them as an experiment.

Also, I cannot import both and apply an effect to one. Any effect I try is applied to both.

Select one of them by clicking just above the Mute button.

For a track that has one continuous piece of audio, you can also select it by double clicking on the waveform.

It will tell you if they are identical.

Then it was not “identical”.

Tracks always import starting at time=0.0. If the “audio” starts in different places, then the files were not “bit identical”.

The method that koz describes (the same as I described) works because “adding” (mixing) a track to the “inverse” of the track, is mathematically identical to “subtracting” one from the other. Each sample value is summed with its negative, and adding a number to its negative always = 0.

Again, how do I “import both”? I either get one track on top of the other, or one right after another.

That’s what you want. One above the other so that you can then invert one of them and then mix the two together.

If you have one above the other, Audacity will try to play them both at once. Pretty much what you need in this case. The volume may double if you do that and cause speaker distortion, so be careful.

Then it was not “identical”.

It was the Left-Right Mono test. The two-track mono portion was done by duplication since the show was ever only a single mono recording. Vocal Removal did not take the track to flat zero.

the files were not “bit identical”.

Since we don’t know where the files came from, the clip could be identical within another show. That turned out to be a false assumption, but that was not a false assumption in a neighboring post.


So yes, neither of the suggestions worked, and two months later I still hope someone will tell me how to make it work.

If the invert and add failed, they they weren’t bit identical.

File > Import one and then File > import the other. That puts them one above the other. Effect > Invert one of them and add them. If they didn’t cancel, they weren’t bit identical for whatever reason.

You never told us if you were planning on suing anybody.


If the tracks are truly identical then this trick works. However if they are just “kind of identical” (such as one was compressed to an mp3 and the other wasn’t) then the result won’t be silence, and will often not sound too different from from either track separately. (Once you have both tracks loaded you can use the “solo” button to listen to them by themselves)

If you hear an echo or “hollowness” to the mixed sound it means one is delayed from the other, so zoom in very close till you can see individual samples (preferably try to find a large transient edge) and slide one relative to the other to line them up.

If I understand correctly, if the result is silence and the new peak amplitude is infinity, then the tracks are exactly the same, down to the last bit.

But what if the result is silence, and the new peak amplitude is not infinity? Are they still the same?

No. If the new peak amplitude is “negative infinity”…
The amplitude of signals are measured relative to “full scale” (full track height), where full scale = 0 dB. Thus as signals get smaller, their dB level is increasingly negative. -inf (negative infinity) dB = absolute silence.

If inverting one track and mixing (summing) with another track does not produce absolute silence, then the two tracks were not identical.

Ok, but what if the result is just silence, but not absolute silence (no negative infinity)? Is it then correct to say that the audio of the two tracks is almost the same, but not the exact same copy?

Yes. The sound that is left is the difference between the two tracks. The less the difference, the more the sameness.

Audacity doesn’t have a “compare files” button, but you can compare tracks as described in this forum thread.

I did this once, importing two tracks and inverting one, expecting for silence, before playing them it will be required to synchronize their first samples that “jump” from the zero line to a non zero value. In order to do that, much zoom is needed.

neither of the suggestions worked

What do you get when neither of them worked? Something must have happened.

These are two identical sound files. I selected one by clicking Select (on the left). Then Effect > Invert.

Screen Shot 2020-03-23 at 13.30.02.png
If you look carefully, you can see that the up and down patterns are mirror image.

Don’t select either one by clicking in a blank area.

Tracks > Mix > Mix and render.

Screen Shot 2020-03-23 at 13.29.45.png
You can prove your analysis technique by opening just one of the files and duplicating it. Edit > Duplicate. Then Select > Effect > Invert one of them and Tracks > Mix > Mix and Render. You should get a straight line if your technique was correct. If you did, apply those same tools to your two mystery files.

Identical sound files are super rare. If you told Audacity to make two exports from the same show, they may not be identical because Audacity adds a very tiny dither signal to each one, and they’re different.

MP3 is famous for making small files by causing distortion. Etc.


The person that wrote that hasn’t logged into this forum since 2018 :open_mouth: