Resampling does not produce identical files

This section is now closed.
Forum rules
Audacity 1.2.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
Locked
rmiller3
Posts: 2
Joined: Sat Apr 26, 2008 1:33 am
Operating System: Please select

Resampling does not produce identical files

Post by rmiller3 » Sat Apr 26, 2008 1:37 am

I just resampled a file to 8kHz by changing the project rate and saving as wav. I compared the hex files and they were very close, but not the same. Every so often (between 1-5 bytes apart usually), the byte would be different by one. What would cause this? I thought a digital resample would produce identical files.


Thanks for the help.

kozikowski
Forum Staff
Posts: 69384
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Resampling does not produce identical files

Post by kozikowski » Sat Apr 26, 2008 1:53 am

Now quite enough information. Resampled what? What was the original file?

They warn you that any resampling at all ever is to be avoided because there is always some damage to the performance. It never comes out even.

Koz

rmiller3
Posts: 2
Joined: Sat Apr 26, 2008 1:33 am
Operating System: Please select

Re: Resampling does not produce identical files

Post by rmiller3 » Sat Apr 26, 2008 3:25 pm

The original files were speech samples, some with background noise and some without. They were originally sampled at 48kHz, I needed them at 8kHz, so I changed the project rate and saved the file. I then did it later since I didn't have access to the first file. Just playing around I later compared the two output files and discovered that, while they were the same size on disk, they were slightly different. I didn't think there would be any randomness in the resampling process.

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

Re: Resampling does not produce identical files

Post by steve » Sat Apr 26, 2008 8:06 pm

rmiller3 wrote: I didn't think there would be any randomness in the resampling process.
There is deliberate randomness in the re-sampling process - it's called "dithering" and it is used when down-sampling to improve the audio quality - it's not strictly as accurate as not using dithering (if examined with a Hex editor) but it sounds better.
http://en.wikipedia.org/wiki/Dither
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked