First thing: a spectrogram does not give the "frequencies" at time $t$. It gives a series of amplitudes, measured for a set of linearly spaced frequenciesfrequency bands.
Anyway, there is no "right" answer to your question, because it depends on which musicological aspect you want to focus on, and you need to enlighten us on that. If you want to focus on melody, extracting the fundamental frequency is the most relevant feature, but I suspect this is not the case here. If you want to discriminate timbredifferent timbres, spectral centroid might be a better way of "summarizing" a slice of spectrogram into a single value - better, but still quite bad.
Indeed I can see several flaws in your methodology:
- Why extract information at time t only (assumedly at a small window centered at t) rather than on the entire segment of sound between onsets?
- Why do you have this constraint that for any onset you have to extract a single real value? Some properties of sound, like timbre, are multidimensional, so you won't be able to entirely capture them in one single value. If we take the example of discriminating tabla sounds (which might or might not relevant to your problem, since you mentioned tala...), we need several features to discriminate them (bayan/dayan discrimination relies on pitch information, while resonant vs non-resonant stroke discrimination relies on timbral informationfeatures).
- You are completely discarding the rhythmic (time) information. Is that really wanted for your problem?
Tell us more about your problem, there's a good chance it has already been solved, and that you are asking the wrong questions to solve it...