[Date Index] [Thread Index] [Author Index]
Re: .WAV file headers
John Reed wrote: > Is there a way to extract the information from wave file headers in > Mathematica? The header is the first 11 words of the wave file and consists > of 4 byte ASCII words and 4 byte integers encoded as ASCII strings. I need > the integers from header words 7 (samples/second), 9 (two 2 byte words, > bytes/sample and bits/sample) , and 11 (number of bytes in the file). > > John Reed > I think you can only get the Mathematica formated informatin itself of the header (i.e. not the header data as it is in the file) To see the header information, set the option PrintHeader to be True, like this: sound = ReadSoundFile["file.wav", PrintHeader -> True]; There might be a way to capture this output to a string, and then parse it to extract the info in a more usable way.