Free Books

Classic Spectrograms

The spectrogram is a basic tool in audio spectral analysis and other applications. It has been used extensively in speech analysis [56]. The spectrogram can be defined as an intensity plot (usually on a log scale, such as dB) of the Short-Time Fourier Transform (STFT) magnitude.8.4 As defined in the previous section, the STFT is simply a sequence of FFTs of windowed data segments, where the windows are allowed to overlap in time, typically by at least 50% [9]. Parameters of the spectrogram include the
  • window length $ M$ ,
  • window type (Hamming, Kaiser, etc.),
  • hop-size $ R$ , and
  • FFT length $ N$ .
As discussed in Chapter 5, the window length $ M$ controls frequency resolution, the window type controls side-lobe suppression (at the expense of resolution when $ M$ is fixed), and the FFT length $ N$ determines how much spectral oversampling (interpolation) is to be provided. The new hop-size parameter $ R$ determines how much oversampling there will be along the time dimension. For $ R=1$ (the ``sliding FFT''), there is no downsampling over time, so oversampling is maximized. For a periodic Hamming window, $ R=(M-1)/2$ gives maximum downsampling of the sliding FFT without time aliasing. Avoiding time aliasing corresponds to retaining ``robust perfect reconstruction'' in the inverse STFT.8.5

The spectrogram is an important representation of audio data because human hearing is based on a kind of real-time spectrogram encoded by the cochlea of the inner ear [199]. The spectrogram has been used extensively in the field of computer music as a guide during the development of sound synthesis algorithms. When working with an appropriate synthesis model, matching the spectrogram often corresponds to matching the sound extremely well. In fact, spectral modeling synthesis (SMS) is based on synthesizing the short-time spectrum directly by some means (see §10.4) [303].

Spectrogram of Speech

Figure 7.2: Classic spectrogram of speech sample.
Figure 7.3: Matlab for computing a speech spectrogram.

soundsc(y,fs); % Let's hear it
% for classic look:
w = hamming(M);
title('Speech Sample Spectrogram');

  1. The harmonics should be resolved.
  2. Pitch and formant variations should be closely followed.
Next Section:
Audio Spectrograms
Previous Section:
The Short-Time Fourier Transform