0
$\begingroup$

I'm starting a project where we will have to analyze bird recordings. We will try to measure the birds activity using the audio.

The recordings are really long (around 24 hours each) and recorded in IMA ADPCM WAV. All files are about 1.5GB each.

When trying to import them into MATLAB, it simply locks up because of the size of the files (I think). So we were thinking about heavily compressing the files to 8KBPS mp3's, which would result in files of around 100MB.

Now I know mp3 compression is based on the psychoacoustics of the human hearing, so I was wondering whether using mp3 compression would throw away data dat would be needed for the analyzation.

If it does throw away data that we would need, what would be the best route to take? Are there other compression techniques that might be better suited to our needs?

Thanks in advance.

$\endgroup$
  • $\begingroup$ From my experience I can confirm that in some cases performance of the system improved when using the compressed data. Especially when data was recorded using codecs such as AAC. Nevertheless sometimes it deteriorated performance of the recognition system. I believe that is up to you to check how pre-processing affects performance of your system. No easy way to tell without knowing nature of sound, features and system itself. $\endgroup$ – jojek Jan 9 '15 at 12:16
  • $\begingroup$ Using a 64 bits version of Matlab may be the simpler option. $\endgroup$ – MSalters Jan 9 '15 at 15:29
0
$\begingroup$

The formal answer is yes. But it also depends on what kind of analysis you will perform. As the name implies a lossy codec will throw away some information (based on human hearing models) that cannot be recovered back. Even when it appears perceptually lossless to human hearing, it will be lossy.

My suggestion is this: Instead of reading all the 1.5 GB raw data at once, read the file in pieces such as 10MB each. This size of course depends again on your "analysis" requirements and audio data definition.

Otherwise use some efficent lossy codec (and adjust the compression quality setttings) to retain as much information as possible while still reducing the file size enough for you.

$\endgroup$
0
$\begingroup$

I would make a comment (not really sure about it) but I don't have enough rep, sorry (tell me if I need to delete this).

I just wanted to suggest trying to load the heavily compressed mp3s first, because I'm guessing matlab would decompress them to the same amount of samples and may lock up the same.

Also, if possible, I would process the files in chunks and not load them all at a time (I'm guessing matlab has a function to seek in the audio file without loading it all in the memory). You say 1.5GB each, so if there are more than a couple, you may actually be maxing your RAM (if matlab converts from 16bit to float or double, one file could probably max the ram).

Last thing, I'm not sure if you mean 8 kylobytes or bits per second. I'm pretty sure 8 kilobits per second is not gonna produce anything remotely usable.

Again, I would have made this a comment because I'm not really sure about it, but I can't :(

$\endgroup$
  • $\begingroup$ (if possible), could you explain the downvote? Thanks :) $\endgroup$ – m fran Jan 9 '15 at 13:12
  • $\begingroup$ Probably a down vote for posting a comment as an answer. $\endgroup$ – JRE Jan 9 '15 at 13:17
0
$\begingroup$

Compressing to mp3 will lose data, depending on the compression it could possibly lose enough that you won't be able to do your processing. At 8kBit per second I would expect problems - speech can start getting hard to understand at that rate, so I would expect bird songs to get pretty mashed up.

It doesn't matter, though, because compressing the file to mp3 won't actually solve the problem you are having.

As @mfran noted, matlab will have to uncompress the file to work on it - this will take as much memory as just reading the .wav in the first place, and will take longer since it has to be uncompressed.

Your best bet is to chop the files into small pieces and work on those. FFmpg can be used to do the splitting (example.) Sox can probably be used as well.

$\endgroup$

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.