Page 1 of 1

Resampling does not produce identical files

Posted: Sat Apr 26, 2008 1:37 am
by rmiller3
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.

Re: Resampling does not produce identical files

Posted: Sat Apr 26, 2008 1:53 am
by kozikowski
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

Re: Resampling does not produce identical files

Posted: Sat Apr 26, 2008 3:25 pm
by rmiller3
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.

Re: Resampling does not produce identical files

Posted: Sat Apr 26, 2008 8:06 pm
by steve
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