What is a Spectrogram?
A spectrogram (also referred to as a sonogram, spectral waterfall display, or voiceprint) is a visual representation of the spectrum of frequencies in an audio signal as they evolve over time. Unlike a standard audio waveform that only displays amplitude (loudness) across time, a spectrogram adds a critical third dimension: frequency distribution.
Time Dimension
Displays elapsed time in seconds as the audio signal streams from left to right.
Frequency (Hertz)
Plots pitch from deep sub-bass (20 Hz) up to ultrasonic frequencies (20,000 Hz).
Amplitude (dB)
Heatmap intensity indicates energy. Darker areas represent silence; bright yellow/white indicates loud harmonic peaks.
How Short-Time Fourier Transform (STFT) Generates a Spectrogram
Digital audio streams in as raw pressure samples over time. To convert these samples into visible frequencies, our tool uses the Short-Time Fourier Transform (STFT):
- Windowing: The continuous stream is segmented into overlapping mathematical chunks (windows) using a Hann or Blackman window to eliminate boundary artifacts.
- Fast Fourier Transform (FFT): The FFT algorithm decomposes each segment into its component sinusoidal frequencies, computing magnitude for each frequency bin.
- Color Mapping: The magnitude (in decibels) of each bin is mapped to a color value and plotted as a vertical pixel stripe.
- Waterfall Rendering: Frames are drawn continuously at 60 FPS to produce a smooth, scrolling waterfall display.
Common Applications of Spectrogram Analysis
Music Production & Mastering
Audio engineers use spectrograms to locate muddy frequencies (200-400 Hz), harsh sibilance in vocals (5-8 kHz), and stereo phase issues.
Speech Therapy & Linguistics
Phoneticians analyze vowel formants (F1, F2 resonant frequencies in the vocal tract) to evaluate articulation and accents.
Bioacoustics & Wildlife Biology
Ornithologists and marine researchers identify bird calls, bat echolocation, and whale songs by matching their visual spectral fingerprints.
AI & Machine Learning
Speech-to-text models (such as Whisper) and neural music generators convert audio into Mel-spectrograms as primary input feature representations.