0
$\begingroup$

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.

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

encod
(* "UnsignedInteger8" *)
$\endgroup$
  • $\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$ – Tyler Durden Mar 11 '16 at 17:32
  • $\begingroup$ @TylerDurden See updated answer $\endgroup$ – Dr. belisarius Mar 11 '16 at 17:50
  • $\begingroup$ Excellent, that makes a lot more sense now, thank you. $\endgroup$ – Tyler Durden Mar 11 '16 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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