Skip to content

Glossary

Mel spectrogram

A Mel spectrogram is a grid of sound energy over time, with frequency bands spaced to match human hearing. Many speech recognizers compute its logarithm, the log-Mel spectrogram, and feed it to a neural network instead of the raw waveform.

Updated October 17, 20263 cited facts, each traced to its source

Also called log-Mel spectrogram, filter bank features, MFCC.

A Mel spectrogram is a grid of sound energy. Each column is a short slice of time, each row is a band of frequencies, and the bands are spaced on the Mel scale, which spaces them more closely at low pitches, where human hearing is finer. Speech recognizers compute this grid from the waveform before any neural network sees the sound, and many of them take its logarithm, which gives a log-Mel spectrogram.

How a Mel spectrogram is computed

The steps are common across recognizers, even when the numbers change:

  1. Cut the audio into short, overlapping windows. Whisper uses windows of 25 milliseconds, moved forward every 10 milliseconds 1.
  2. Measure the energy at each frequency in each window, using a Fourier transform.
  3. Add up the energy in each Mel band with a filter bank, which is a matrix of weights, one band per row. The Mel scale makes the low bands narrow and the high bands wide.
  4. Take the logarithm of each band's energy. The log turns loudness into a scale closer to how people perceive it.

The Whisper code uses 80 Mel bands by default and accepts 80 or 128 2. Each band is one row, so one second of audio becomes a grid of 80 rows by 100 columns. The step between windows sets the number of columns: a 10-millisecond stride gives 100 frames for every second of audio 3.

Three names for related features

The terms overlap, and tools use them loosely:

FeatureWhat it isWhere you see it
Mel spectrogramSound energy in Mel bands, before the logarithmAnalysis and visualization
Log-Mel spectrogram, or filter bank featuresThe logarithm of those band energiesThe input to most neural recognizers, including Whisper
MFCC (mel-frequency cepstral coefficients)A cosine transform of the log-Mel energies, keeping the leading coefficientsOlder hidden Markov model systems and some classic pipelines

The filter bank is the common step. MFCC adds one more transform that decorrelates the bands, which suited older statistical models. Neural networks handle correlated inputs well, so many modern systems skip that step and feed the log-Mel features directly.

Why it matters for dictation

The Mel spectrogram is where the recognizer's view of your voice begins, so its limits set the limits of everything after it:

  • Noise shares the same bands. A fan, a keyboard or traffic puts energy into the same frequency bands as your voice. Once they are mixed in the grid, a model has to separate them, so a close microphone and a quiet room often matter more than the choice of model.
  • The stride sets the pace. Frames arrive at the stride's rate, so a 10-millisecond stride sets how often new frames can reach a streaming recognizer, and therefore how quickly text can appear. See real-time speech recognition for how latency adds up.
  • The features are invisible to you. You never see the grid. You see its result as words, which is why a bad microphone can look like a bad model.

Where it fits in a recognizer

In the classic pipeline, the features feed an acoustic model. In a neural end-to-end system, a network maps the same features to text directly. The guide on how speech recognition works walks through each stage.

Related terms

Guides that cover it

Evidence

Every number on this page, with where it comes from. Open a fact to see the exact words in its source.

  1. 1.
  2. 2.
  3. 3.

Related terms

Pages that use this term