In more detail
A spectrogram is a picture of how the frequency content of a sound changes over time: time runs left to right, frequency runs bottom to top, and brightness shows how strong each frequency is. It is computed with a short-time Fourier transform, which slices the audio into short overlapping windows and measures the frequencies in each. The window length is a trade-off: a long window separates close frequencies but blurs timing, and a short one does the opposite. Forensic analysts use it to spot edits (sudden changes in background noise), missing frequency bands that reveal low-bitrate encoding, and hidden tones or messages. See the audio forensics tool.
Why it matters
A waveform shows loudness over time but hides what the sound is made of. In a spectrogram, a clean cut, a pasted-in clip with different room noise, a sharp low-pass edge from lossy compression or a constant 50 or 60 Hz hum becomes a visible shape. Misreading the settings, such as a window that is too short, can make a steady tone look smeared.
Example
For audio at 44,100 Hz with a 2,048-sample window, each window lasts 2,048 / 44,100 = 46.4 ms and the frequency bins are 44,100 / 2,048 = 21.5 Hz apart. Moving the window forward 512 samples each step gives a new column every 11.6 ms. A pure 1,000 Hz tone shows as one horizontal line near bin 46 (1,000 / 21.5), while a click shows as a vertical stripe covering many frequencies. Related ideas are the Sample rate and the mains-hum trace called Electric network frequency (ENF).