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.”
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.
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.
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.
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.
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.
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.
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.