27
$\begingroup$

Soundscape indices are being used to summarize, present, and compare patterns of biological diversity. With ever-larger datasets, we need more and more efficient tools for calculating these indices. Has anyone performed benchmarks for script-based tools to extract soundscape indices?

$\endgroup$

9 Answers 9

14
$\begingroup$

PAMGuide is a great place to start. It is only looking at the soundscape, not biological diversity. But PAMGuide is widely used by researchers and regulatory bodies. Output formats include R, Python, and Matlab.

Recently, as part of the JOMOPANS project, Ward et al., 2021 put out a set of standards. These standards are being applied to other soundscape measurements in the EU. You can apply these standards to your own soundscape analysis code.

References

Ward, J., Wang, L., Robinson, S., & Harris, P. (2021). Standard for Data Processing of Measured Data. Report of the EU INTERREG Joint Monitoring Programme for Ambient Noise North Sea (Jomopans).

$\endgroup$
0
13
$\begingroup$

PAMGuard (www.pamguard.org) has a number of noise modules including an ANSI standard Noise band Filter modules which can calculate octave or third octave noise levels. This allows users to quickly process large multi channel datasets, visualise and export results without any coding.

Quick Tutorial

Open PAMGuard and add a Sound Acquisition, Noise Band Monitor, Database and Binary Storage modules (use File -> Add Modules to add new modules). If this is in air then select File -> Sound Medium -> Air Open Sound Acquisition settings in the Settings menu, select Audio File or Multiple files in the drop down menu, click Browse and select a folder of wav files. Next open the noise settings (Settings -> Noise Band Monitor)

The settings dialog for the noise band monitor in PAMGuard

The settings dialog for the noise band monitor in PAMGuard

Go to File-> Database and create a new database. Next go to File-> Binary Store -> Storage Options and select a folder to save PAMGaurd binary files to. In File -> Storage Options you can now save noise band measurment either in the database or binary files. The database is human readbale but the binary files allow easier exporting of the data into MATLAB or R.

You are now all set up so press the red button and PAMGuard will churn through all the files. You now have three options for viewing the results.

  1. Open PAMGuard viewer mode and browse through the data. A summary of the noise data is shown in the Datagram tab. Right click on the noise datagram and select center data here - then move to the Noise Band Monitor tab to visualise the data at in more detail and at finer temporal scale.

enter image description here

The noise display allows users to scroll through noise band measurment results fand/or visualise results during real time operation

  1. Open the .sqlite database e.g. using SQLite studio and manually export results to a spreadsheet. Note you will need to have specified that noise measurments should be saved to the database in File->Storage Options

  2. Export noise band measurments using either R or MATLAB. A handy library for MATLAB which also plots noise data is here. Instruction for using the R-PAMGuard library are here.

A few days of noise data imported and plotted in MATLAB using the PAMGuard datagram library

*A few days of noise data from a duty cycled recorder imported and plotted in MATLAB using the PAMGuard datagram library - see

https://github.com/macster110/pamguarddatagram/blob/master/example_scripts/loaddatagram_noise_test.m

for example code*

The flexibility of PAMGuard (i.e. the large number of signal processing and detection/classification/localisation modules) means it can be very useful for large scale soundscape analysis. Check out this paper on Greenland soundscapes which used PAMGuard as the primary analysis tool.

Ladegaard, M., Macaulay, J., Simon, M. et al. Soundscape and ambient noise levels of the Arctic waters around Greenland. Sci Rep 11, 23360 (2021). https://doi.org/10.1038/s41598-021-02255-6

$\endgroup$
1
  • $\begingroup$ This really isn't answering the original question, which is focused on the speed of index calculation. Providing some benchmark numbers or relative rankings would greatly improve this. $\endgroup$
    – dtsavage
    Sep 20, 2022 at 13:30
11
$\begingroup$

I use R (tuneR/seewave/soundecology packages) and yes, Kaleidoscope (that is not open source) is way faster. However it does give you access to the common indices only. I can say that depending on how you code in R, the process can be largely sped up. I recommend using parallel calculation, for example using the parallel package. Here is an example in R:

library(parallel)

ListPathToWave<-list.files("MydirectoryWhereMyWavesArePath")
RepTemporary<-"MyTemporaryDirectoryPath"

no_cores<-detectCores()-1
cl<-makeCluster(no_cores)

parLapply(cl, ListPathToWave, function(x) {
    library(tuneR)
    library(seewave)
    ObjectWave<-readWave(x)
    Index<-ACI(ObjectWave)
    save(Index,file=paste(RepTemporary,"/",basename(x),".Rdata",sep=""))
})
stopCluster(cl)
$\endgroup$
2
11
$\begingroup$

I've used both R-based tools (built around Seewave / tuneR / soundecology) and Wildlife Acoustics' Kaleidoscope Pro software to calculate indices, and as much as it disappoints me to say it, Kaleidoscope is faster by an order of magnitude or more (I don't have exact numbers at this point but I can try to run some benchmarks some time next week). It's certainly possible that a better R developer than me could make some efficiency improvements, possibly significant improvements, to the code I'm using right now but the results I've seen suggest that any hypothetical open-source tool that's fast to calculate these indices would want to be written in a lower-level compiled language compared to R or Python.

$\endgroup$
2
  • 2
    $\begingroup$ The power of Java. :) R will never be as fast as software developed in Java or a similar OOB language. Python might. However, what you lose in speed you make up for in the ability to customize. $\endgroup$ Jul 5, 2022 at 6:54
  • $\begingroup$ I'd definitely agree with that sentiment. I think this might also be an opening for some friendly developer to build an open-source tool for index calculation in Java, C, etc. Potentially even one that could be called from a CLI so that you can wrap calls to it in your R or Python scripts. $\endgroup$
    – dtsavage
    Jul 5, 2022 at 14:10
6
$\begingroup$

For MATLAB users, Triton software can be useful for soundscape metric analyses. There is an add-on package called the Soundscape Metrics Remora that can be used to calculate various parameters. The links provided will take you to the Github Wiki pages for these tools, which have great step-through guides about installing/using Triton and the associated soundscape package. Hope this helps!

$\endgroup$
5
$\begingroup$

I've been using the relevant R packages, Soundecology and Seewave for the last couple of years to quantify acoustic data, primarily over time-series domains. Typically, I usually examine one acoustic index as a variable (against time), but some acoustic indices perform well in correlation with each other - such as ACI (acoustic complexity) and BI (bioacoustic index) and can be modelled in given instances. However, as with anything in bioacoustics, context is critical.

Something that I would also strongly suggest is taking the time to design a good exploratory data science workflow. Something that I had to reckon with early on was the process of importing lots of data and subsequently tidying up the structure of the outputted dataframe, fixing dates and so forth. This might seem slightly rote, but setting up a smooth process in R makes a huge difference!

As user971889 mentioned, the Python skikit-maad looks very impressive, with a much larger suite of acoustic index algorithms for the user to implement. I've been meaning to explore this package, but I haven't yet found the time at present.

$\endgroup$
4
$\begingroup$

If you're using Python scikit-maad is a pretty good option! https://scikit-maad.github.io/

$\endgroup$
2
  • $\begingroup$ Do you know how this compares to the PAM2Py option (PAMGuide adaptation for Python)? siplab.fct.ualg.pt/proj/jonas/pam2py.shtml $\endgroup$
    – Chloe
    Jul 4, 2022 at 15:00
  • 1
    $\begingroup$ scikit-maad has AMAZING documentation too. Even a Python newbie like myself got it going without too much pain $\endgroup$
    – Carly Batist
    Jul 6, 2022 at 16:35
3
$\begingroup$

For Python there is: OpenSoundscape, scikit-maad, and Acoustic_Indices.

For R there is: soundecology (plus see this tutorial), seewave

I agree with previous comments that Kaleidoscope Pro's soundscape calculations are fast & the interface is very easy to work with, but it is obviously expensive as others have pointed out. They do have short-term free trials for the software if you wanted to try it out and see if it would be worth it for you to invest in buying a subscription.

I believe ARBIMON is also building in soundscape index calculations into their platform now.

$\endgroup$
1
$\begingroup$

I have used Kaleidoscope Pro to calculate acoustic indices and this is a very user friendly software. I have also use packages within R that work well too.

$\endgroup$
1
  • 2
    $\begingroup$ Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. $\endgroup$
    – selene
    Jul 4, 2022 at 17:03

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.