Analysis and save of large file

21 views
Skip to first unread message

Rabasco Florian

unread,
Sep 6, 2022, 3:27:59 PM9/6/22
to seewave
Hi,
I'm working with marine soundscape, and I'm very new with sound analysis.
I wanted to know how to analyze large wav file, and save them please ?
For now, as a try, I have 124 wav files of 1 minute. I merge them into 1 wave file to be abble to do analysis for the whole day (see how amplitude or frequency change in time as example). However, this files is really large, and when I try do use oscillo or spectro function, I have this error "Error: cannot allocate vector of size 1.2 Gb".
I then, try to apply a frequency filter with ffilter to reduce the size, but I have then this error "Error: cannot allocate vector of size 16 Kb"
I also try to save the file, and same problem.
I will, in the future, have way more file.
So my question is, how to analyse, work, and save with large file ?
Thank you very much for your answers !

Best,
Florian

Jérôme SUEUR

unread,
Sep 14, 2022, 4:30:52 AM9/14/22
to seewave GROUP
Dear Florian,
This is one of main issue when working with R. The problem is that R stored the objects in the RAM. If you handle long heavy wav files, you can saturate the RAM and so have no more space for computation or temporary memory allocation.
The function lts() might help as it is done to produce long term spectrograms with either songmeter or audiomoth files.
HTH a bit
Best
Jerome


De: "Rabasco Florian" <florian...@gmail.com>
À: "seewave GROUP" <see...@googlegroups.com>
Envoyé: Mardi 6 Septembre 2022 21:27:59
Objet: [seewave] Analysis and save of large file

--
You received this message because you are subscribed to the Google Groups "seewave" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seewave+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/seewave/16523a51-e380-46de-9fb4-4d45f9345dban%40googlegroups.com.

Simon Linke

unread,
Oct 10, 2022, 3:24:41 AM10/10/22
to seewave
Hi Florian! 

The best option is really: Use a computer with at least 8GB or best 16 GB of RAM. 
I am not 100% sure what happens in the background on different OSs, but you can also try to set
memory.limit(size= 16000) in R. If you machine is clever enough it can potentially farm it out to the swapfile.  I reckon it's worth a try.

Simon
Reply all
Reply to author
Forward
0 new messages