A bug with WAV resampling? [SOLVED]

Hi,
I have a quite counter-intuitive situation. I have several smallmono WAV audio files with the bitrate 8000, and the depth 16-bit. I need to convert them to the WAV with the bitrate 16000Hz, and the same depth 16-bit. I open an original file of 400Kb size, do a project rate change from 8000Hz to 16000Hz, export to the new folder, and a file from 400Kb has become a file of 800Kb. It makes sense to me. Now I open an original file of 65Kb size, do a project rate change from 8000Hz to 16000Hz, export to the new folder, and a file from 65Kb has become a file of 260Kb. Why?
It happens for all smaller WAV files, the bigger files are converted correctly, i.e. grow to be bigger about a double of an original size, but the smaller files grow to be four times bigger after resampling from 8000Hz to 16000Hz.
I use Audacity 2.10 in Windows 7. I had the same problem with 2.04, upgraded to 2.10, and I still have the same situation.

Both 2.04 and 2.10 are fake Audacity versions. You can get Audacity 2.1.0 from here:

http://audacityteam.org/download/windows

When the installer asks to reset Preferences, say yes.

Koz

I use 2.1.0, and I have downloaded it from this website http://audacityteam.org/download/windows
2.0.4 I probably have downloaded from Sourseforge.
What’s about the strange behavior of the WAV file’s size after resampling?
I have attached a couple of the WAV files that I resampled from 8000Hz to 16000Hz. The bigger file became about twice as big, and the smaller file became about four times bigger than an original file. My expectations were that both will about double its original size.

The 1st file is about 8 seconds long. The 2nd file is about 27 seconds long.

\

For uncompressed files you can calculate the file size if you know there are 8 bits in a byte:

File Size in Bytes = Playing Time in Seconds X (bit depth/8) X Number of Channels X Sample Rate in Hz

Yes, and it means that if I double the sample rate, and leave everything else the same, then the size should about to double in size (a WAV file’s header is still the same in length). In practice the bigger file from the attached samples behaves as expected, and the smaller file has quadrupled in size after resampling. I can’t explain why the resampling of the smaller WAV files in Audacity shows such anomaly.
Please see an original question. The attached files are of the same type, but one is not a product of the conversion of other.

Pleas also attach the originals.

The correct terminology might be less confusing. I assume you meant to convert a sample rate of 8000 Hz to 16000 Hz.

Bit rate (usually measured in kbps) does exist for WAV and is sample rate * number of channels * bit depth. So an 8000 Hz mono 16-bit file is 128 kbps.


Gale

The smaller 8000 Hz file is 8-bit, so when you export it as 16000 Hz 16-bit PCM the file size quadruples.

The bug is in whatever tool tells you that the smaller file is 16-bit.

You can use “MediaInfo” from MediaInfo - Download MediaInfo for Microsoft Windows to examine details of audio files. Get the version without installer, because the installer may have malware or adware.


Gale

Thanks Gale, good catch.
For the a01_366700.wav file Mediainfo reports 8bits, 8000Hz, but Audacity 2.1.0 shows it as to be 16bits, 8000Hz (left upper corner).
Based on the file size check it looks like Mediainfo is right. The initial files were with the different sample rate, so resampling was correct, and only file’s info in Audacity was incorrect.
For the a01_366700.wav file Audacity incorrectly shows it to be 16 bits depth when in reality it is 8 bits depth file.

The information in the panel on the left end of the track refers only to the default format for that track. It is not an indication of the original file format, or even of the actual format of the data in the track. http://manual.audacityteam.org/o/man/audio_tracks.html#info

Thank you Steve,
I thought that when I open a file, then I do see an actual format of the tracks in the file, not the defaults for a project.

The case is closed then, thank you everyone. :smiley: