I have a large wav file (100 Mb). Any operation on it is time consuming. For example, to Import it takes about 1-2 minutes.

The next step seems to be to figure out how it is encoded, since WAV files can be encoded in a lot of different ways. How can I determine the encoding? I tried using Take, but I found no meta information:

enter image description here

Note that every operation is taking a long time here, so I am hoping to figure out how to do this fast.


1 Answer 1

{encod,sound,data} = Import["ExampleData/rule30.wav",{{"AudioEncoding","Sound","Data"}}];

(* "UnsignedInteger8" *)
  • $\begingroup$ I did see that possibility however it seemed very inefficient to me so I thought there would be an alternative. Are you saying I need to Import data 3 times or more to analyze it? Once to find the elements, once again to retrieve the element, then a third time to retrieve the data? The problem here is that some of the files I am processing could take 10 minutes or more to import. So doing this 4 or 5 times or whatever seems outrageous. $\endgroup$ Commented Mar 11, 2016 at 17:32
  • $\begingroup$ @TylerDurden See updated answer $\endgroup$ Commented Mar 11, 2016 at 17:50
  • $\begingroup$ Excellent, that makes a lot more sense now, thank you. $\endgroup$ Commented Mar 11, 2016 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.