1

my name is Annabelle. I'm not sure if this is the right place to post this request, but here goes. I am a sight challenged woman who is a sound designer, and I'm having trouble with making a specific .wav file play in Windows Media Player, Audacity, or even Sonar 8.5 Producer Edition. I'm trying to fix a .wav file that I recently recovered, and the data is there, but the RIFF header is missing. I'm reading this with Notepad++, which I'm not sure if that makes sense to you. Usually, there's a section at the beginning of a wave file that says something like: RIFFø ß WAVEfmt D¬ Ì JUNKÊ data øÞ ¿ Ä | [ 0 Æ j r Ú µ \ / î } ¥ [ L ‡ ¦ û ] î - t X Ð [ G ù / p æ U } B i F b

  • á · P “ K w é F y ² ç 9 8 ž ¤ e ž Ž b Ó Þ Ô ß p ­ : Î ' Ý $ x w ' í ( n ù À Z • ­ Û ˜ tÿÿaÿÿOýÿüÿmüÿôûÿ÷ûÿ7ýÿ3ÿÿÁýÿ þÿ üÿ ýÿ›ûÿ¡úÿñùÿ%øÿ}÷ÿ<øÿ·õÿÑôÿ½õÿ ôÿ"ôÿ(óÿLóÿsñÿ¡óÿ<öÿÖõÿôÿ‡öÿNöÿVõÿÕóÿ\õÿ õÿóóÿ8òÿZôÿXóÿ€òÿ°óÿ•òÿ^ñÿþóÿ½óÿ(ôÿæôÿœõÿ öÿ:÷ÿ ÷ÿùÿõøÿ»ùÿ¦øÿ=øÿ’úÿì÷ÿ4øÿ ùÿÆöÿ øÿDùÿÿ÷ÿÅùÿÙøÿ"úÿDùÿdøÿ¹øÿ ÷ÿ—ôÿ…öÿ•÷ÿò÷ÿ¤õÿùÿ øÿ²ùÿŠûÿ.þÿüÿÿ ÿÿ xÿÿi Ë k ô $ Á ’þÿ &ÿÿ cÿÿåþÿ·ûÿÌûÿÏüÿ%þÿýÿ…üÿ:þÿ¦ÿÿ¢ÿÿ€þÿÜþÿ<ÿÿžÿÿyýÿJýÿ-ÿÿ Zþÿ | A ÕþÿÞþÿ-ÿÿ i ˜ÿÿ» . g ì Ä º | 4 š W S i I'm not sure which part is the header and which part is the data, as there's a bunch of foreign characters in this chunk that I've pasted. Is there a way for me to send the full .wav file as an attachment so I can show you what I mean? What I'm trying to do is reconstruct the recovered .wav file so it will play. I tried Import raw data within Audacity, but it gave me a whole lotta nothin'. If I try opening it with Sonar, it says the file may be damaged. If I open it with Windows Media Player, it says the file is either corrupt or the codec used to compress the file is not supported. This doesn't make sense, since all .wav files, especially "RIFF wave" files are uncompressed, right? What shall I do next? What I do know about this file is, the length of the song is 4 minutes, 25 seconds, it was made as a RIFF wave file, the bite order is supposed to be Little Endian, the Bits Per Sample is 24, the number of channels is 1, the bitrate is 1058KBPS Constant, which is also rendered as 1059KBPS in another section, the codec ID is 1, and the sample rate is 44,100 KHZ.
10
  • Hi Annabelle. It looks like Notepad is interpreting the file as text not binary data which makes the result unfortunately garbage. Temporarily you could post your file to DropBox, Mega etc & give us the link here. The question itself is going to need some format tweaking to make it more comfortable for our sighted users, but let's think about that once we can tell where the question is pointing. in the meantime, maybe see stackoverflow.com/q/38344950 or stackoverflow.com/q/13660777
    – Tetsujin
    Oct 21, 2022 at 17:04
  • 1
    HexEdit may be the tool for the job - catch22.net/software/hexedit - I'm not on Windows so can't test
    – Tetsujin
    Oct 21, 2022 at 17:10
  • Would I be able to post a Hightail link? Since I have a Hightail account, which is what used to be YouSendIt. How would I post the file? Would I just post it into a folder in my Hightail account, then post the link here? I'm confused!
    – Annabelle
    Oct 21, 2022 at 17:35
  • Anywhere you can post a file to & share a public link anyone can access. Most file share services have something like this. Post the link here in comments.
    – Tetsujin
    Oct 21, 2022 at 17:54
  • I'm not sure if this will work, but here's a link to the file. download.spaces.hightail.com/api/v1/download/link/HIGHTAIL_FILE/…
    – Annabelle
    Oct 21, 2022 at 18:14

1 Answer 1

2

As it seems you know all the parameters which are necessary to read the raw audio data, my suggestion would be :

  • Open a copy (to prevent any involuntary destruction of the original file) of the corrupted file with an hexadecimal editor (a text editor that shows raw bytes and their value in common encodings)

  • Locate the 'data' string (it is '64 61 74 61' in hexadecimal)

  • Remove all bytes from beginning of the file to the 'data' part (including the 'data' string) plus the four next bytes. For example, it might look like '....64 61 74 61 0A 0B 0C 0D', you should remove all bytes up to '0D' included.

  • Save as raw data

  • Launch an audio editor (audacity for example) that is able to read raw audio data

  • Open the edited file as raw audio, filling the appropriate fields with the value you know (sampling frequency, samples size, byte order, number of channels)

  • Your file should be readable in the audio editor

  • Save/Export the file as wav from within the audio editor to produce a wav file with correct header

It seems that to use notepad++ as an hex editor, you need to install a plugin. See https://stackoverflow.com/questions/60641199/use-notepad-as-hex-editor

Also notice that wav files can contain non-pcm audio data, in which case this procedure will fail.

4
  • I wonder if I should have sighted help to do this, in case it actually does fail.
    – Annabelle
    Oct 22, 2022 at 11:30
  • Unfortunately, I am not much aware of the difficulties a person with sight issues may encounter with text editor or audio editors software. You probably know better than me.
    – audionuma
    Oct 23, 2022 at 16:40
  • You might give a try to github.com/agfline/wavfix/releases
    – audionuma
    Oct 23, 2022 at 16:43
  • Would that be a screenreader friendly software? Also, don't you have to have a github account for that?
    – Annabelle
    Oct 23, 2022 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.