Spectrographic labelling automated

Hello,

Sorry if this has been asked before. I didn’t find anything from searching but some veterans here may already know how to do this.

I have spectrograms from wav files that I want to label. I’m trying to label all time segments where the decibel is above some amount. I’ve been doing this by hand but since the files are very long and it’s the same task I wanted to see if I could do this using a macro.

Can I help with which commands I would need? Thanks in advance. I’ve attached an example of what I want to label.
Screenshot_20221130_104700.jpg

Unfortunately, neither macros or Nyquist can “see” (can’t access) the track spectrogram.