8
$\begingroup$

I'd like to calculate a set of false colour spectrograms, from long-duration audio -- i.e. the type of visualisation introduced by Michael Towsey's research group at QUT, like this:

false-colour spectrogram

false-colour spectrogram

The QUT Ecoacoustics group have open-sourced their own analysis code which is the "official" implementation. It runs on Windows/Mac/Linux. (But it's implemented using Windows tools (Mono and Powershell) so on my Linux laptop I'd have to install a lot of extra kit to get it running.)

I wrote (together with Sarab Sethi) a Python script to calculate them. (It produced the lower image shown above.) It has the advantage of being a simple standalone Python script, but it's not perfect -- it doesn't implement all the same acoustic indices as the QUT original.

Hence my question: Has this type of long-duration spectrogram been implemented in any other software or scripts?

$\endgroup$
4
  • $\begingroup$ Purpose of these plots? research/discovery or presentation? IMHO, too many colours are hard to digest as customer, but can be instructive for the person that generated them $\endgroup$
    – WMXZ
    Commented Oct 14, 2022 at 15:54
  • $\begingroup$ @WMXZ The purpose, for me at least, is visual data mining. There's a nice example published by Znidersic et al about using them to discover cryptic species in long audio recordings. Towsey et al have published quite a lot showing that they're useful. You do need to be experienced with them to "read" them well. $\endgroup$
    – Dan Stowell
    Commented Oct 15, 2022 at 11:29
  • $\begingroup$ @DanStowell is it a spectrogram that you are after, showing time vs frequency, or a false colour plot e.g. time vs date, with three acoustic indices represented on the RGB channels? Obvs the latter is much easier to code. $\endgroup$ Commented Oct 19, 2022 at 8:55
  • $\begingroup$ @CarlosAbrahams false-colour spectrogram. BUT as you see in the images I showed, these are still time versus frequency. The acoustic indices are measured separately for each frequency bin, so each pixel represents something like 1 minute for 1 frequency bin. I think I know the other version that you're thinking of, which is even more zoomed-out where 1 pixel is 1 entire day - that's not what I'm looking for. $\endgroup$
    – Dan Stowell
    Commented Oct 19, 2022 at 12:42

3 Answers 3

5
$\begingroup$

scikit-maad seems to have the ability to extract acoustic indices, in a format that can then be plotted like this. See the code example on this page, with a false-colour spectrogram plotted at the bottom of the page.

scikit-maad is a Python software package.

$\endgroup$
2
$\begingroup$

@DanStowell - Thanks, thought that might be the issue. Just picking up from our comments, I've only generated false-colour images for acoustic indices across the whole bandwidth, not for frequency bins - resulting in plots as below, which don't show any frequency spectral data

Extended Acoustic Summary image

For anyone interested in this type of plot, R code would be something like:

# Rescale acoustic indices to 0-1 for RGB colours    
ai_data <- ai_data %>%
      mutate(
        ACInorm = rescale(ACI),
        BInorm = rescale(BI),
        ADInorm = rescale(ADI),
        NDSInorm = rescale(NDSI)
      )
# Plot false-colour raster
ggplot(ai_data, aes(x = DATE, y = TIME)) +
  geom_raster(alpha = 1, 
             fill = rgb(red = ai_data$ACInorm)),
                        green = ai_data$BInorm)),
                        blue = ai_data$NDSInorm)
             )
$\endgroup$
1
$\begingroup$

Long-term spectral averages can be generated in PAMGuard. We generate LTSA during offline processing of recordings, and then use the output in PAMGuard Viewer mode to search for marine mammal events to look at more closely with a short-term spectrogram. The longer term perspective is often very interesting, and detector output (e.g. whistle & moan detector contours) can be overlaid on the LTSA. The Matlab package Triton specialises in LTSA plots, but I have less experience with this.

$\endgroup$
1

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.