What functions are available for Importing Sound files into M? *.WAV ?

Q1) I have been trying to import a sound.WAV file into M8 without success. I need to decipher the WAV header for # samples, sample rate, bits/sample, stereo y/n, …
I would greatly appreciate a code snipet that would accomplish this.

Q2) I can use Import[“C:\dir1\dir2\sound.WAV”,“wave”] to load a complete file plus header.If the size of the file exceeds about 6MBytes, M8 “fails”. Is there a real limit to the size of wave file that M8 can handle OR is this another mistake on my part?

This gets you all of the metadata directly available to Mathematica:

Import["ExampleData/rule30.wav", #] & /@ {"AudioChannels", 
  "AudioEncoding", "SampleRate"}

And this gets you the number of samples:

Length[Import["ExampleData/rule30.wav", "Data"][[1]]]

Bits per sample is a bit more complex, but I think this should be what you’re looking for:

N[(Length[Import["ExampleData/rule30.wav", "Bit"]])/(Length[
    Import["ExampleData/rule30.wav", "Data"][[1]]])]

I don’t know if there are any import limits or restrictions in M8, but M10 loads an 18mb file without a hitch. It’s probably either the older version or some kind of memory problem on your computer. Could you post the message Mathematica fails with?

This can be automated

fileName = "one.wav";
ele = Import[fileName, "Elements"]

Which gives, for this file

  {"AudioChannels", "AudioEncoding", "Data", "SampledSoundList", "SampleRate", "Sound"}

and now

 all = Import[fileName, #] & /@ ele;

I was specifying that limited set of elements because the others are raw data from the audio of the file itself. If one wanted to fetch all available elements for a file, one could use

Import[fileName, #]&/@Import[fileName, "Elements"]

I’m pretty sure the set of available elements is the same for all wav files though.