If I have two audio signals, say $A_{1}$ (music) and $A_{2}$ (Speech), I want to calculate the energy of the two signals for their relative comparisons. One method I can use is by adding the square of audio samples over its length as follows:
$$ E = \sum_{n = 0}^{N} A \left[ n \right]^{2} \tag{1} \label{1} $$
My doubt is: how do I find the energy of the same signals using the Fourier coefficients? Does Parseval's theorem hold for such signals? Because Fourier coefficients are continuously changing with time. So, what is an alternative way to compute the energy of the signal using the frequency representation? Can STFT help in it? If yes, then how?