How to fix a corrupt wav file? [SOLVED]

As a rather inexperienced Audacity user, I ran into the following problem:

I was not aware of any recording length or file size limitations, so I made from radio a timed recording, lasting almost 7 hours. Audacity version was 1.3 Beta.

I thought that I process the recording later, so I saved it in WAV format. No complaints from Audacity, none at all. I checked the saved file size from Windows Explorer; it said 4 258 569 KB, which seemed about right.

Later I tried to open the file. Opening seemed to happen very quickly: Audacity had opened only 6 minutes 13 seconds from the beginning of the file!

Digging a little I learned that WAV files cannot be longer than 4 GB. Audacity had saved the total contents of the recording, more than 4 GB, but stored as file size in the file header only the amount by which the actual file size exceeded 4 GB. And so Audacity – or any other sound program – will open only the first few minutes of the file. For most purposes, the file is corrupt.

Any ideas of how to salvage the contents of this file, or at least most of it?

I have plenty of space and the file system is NTFS. Win 7 32 bit, now Audacity 2.0.6


Thanks,
Matti P.

Try File → Import → Raw Data.

You’ll have to enter the correct bit-depth (and it should be PCM encoding), number of channels, and the sample rate. If you get “pure noise”, try incrementing the offset by one.

If the sample rate is wrong, you’ll get the wrong speed. If the offset is wrong you can get noise or the left & right channels can be reversed.

The default byte order is should be correct, but if all else fails and you’re getting pure-noise that could be the cause.

The true offset (where the file header ends and the audio starts) is somewhere around 30 or 40, but you don’t have to get it perfect… You’ll get a “glitch” of noise at the beginning of the file where the header is read as audio, but you can edit that out once the file is open in Audacity.

Worked, thank you!

Matti P.