I have computed a Spectrogram 2D array as :
Now, I want to find spectral peaks to find the respective temporal displacement. In python using STFT or spectrogram, I got the peaks as following :
How do I find these peaks programmatically? I tried a way of finding maximum values per chuck and then finding max values in all the chunks. But I couldn't able to get the desired result. What are the ways of finding peaks in spectrogram?