I am curious to know the relation between the 16-bit amplitude values in the PCM-encoded signal and the values inside the corresponding spectrogram. I am using Scipy reading a 44100-sample rate song:
from scipy import signal
from scipy.io import wavfile
sample_rate, samples = wavfile.read('some_song.wav')
freq, times, spectrogram = signal.spectrogram(samples, sample_rate, window='hamming',
nperseg=4410, noverlap=0)
The integer values of samples
(in my song) is [-15039, 16432] which I interpret as the relative amplitude level at the particular sample.
However, the integer values of the spectrogram ranges from [0, ~16.7 million]
Can someone explain the relation between those intervals? I guess they're both saying something about the amplitude.
Thanks