AI Glossary / Natural language and speech / Intermediate
Mel
Definition
A mel is a unit on a perceptually motivated pitch scale. Mel-scale frequency mappings make equal steps correspond approximately to perceived pitch intervals rather than equal changes in hertz. In speech technology, the scale commonly guides the spacing of frequency bands used to create acoustic features.
What it means
Hertz measures physical frequency in cycles per second. Human pitch perception does not increase linearly with that number across the audible range, so a fixed frequency difference does not have the same perceptual significance everywhere.
The mel scale provides a useful transformation for organizing frequency information. It is associated with pitch, not loudness, and it is not a language-model token or a unit of audio duration. The familiar term mel spectrogram refers to a representation built using mel-spaced frequency bands.
Practical software uses more than one mel convention. A model trained with one feature-extraction setup may not receive equivalent inputs from another setup just because both are described as mel-based. The exact mapping and filter configuration matter.
How it works
One common mapping, used in the HTK-style convention, is m = 2595 × log10(1 + f/700), where f is frequency in hertz. Its inverse is f = 700 × (10^(m/2595) − 1). This mapping compresses higher frequency ranges relative to lower ones.
To build mel features, a speech pipeline first obtains a short-time spectrum. A filter bank combines spectral values into bands whose locations follow the chosen mel mapping. Many systems then take the logarithm of the resulting band energies.
Two distinct transformations are involved: mel spacing concerns the frequency axis, while taking log energy concerns the feature magnitudes. A log-mel representation should not be confused with a single pitch estimate for the entire frame.
Mel-frequency cepstral coefficients add a further transformation to log-mel features. The terms mel, mel spectrogram and MFCC therefore describe related but different concepts. Band count, frequency limits, normalization and other preprocessing choices all affect the resulting representation.
Three practical examples
- A speech-recognition model receives log-mel features that summarize energy across perceptually motivated frequency bands.
- A voice-generation system uses a mel-spectrogram representation as part of its acoustic pipeline, with the exact configuration specified.
- A deployment team checks mel-scale convention and filter normalization when reproducing a model's training-time preprocessing.
Think of it this way
Think of a map whose scale changes so that some regions receive more detail than others. Mel spacing devotes relatively finer frequency resolution to lower regions and coarser resolution to higher ones under common mappings.
The analogy does not imply that higher frequencies are irrelevant or that every listener perceives sound identically. It describes a useful engineering representation rather than a complete map of human hearing.
Worked example
Comparing equal hertz steps
Use the stated HTK-style formula. A frequency of 1,000 Hz maps to approximately 999.99 mels, 2,000 Hz to 1,521.36 mels, and 3,000 Hz to 1,876.45 mels.
The first 1,000-Hz increase therefore spans about 521.37 mels, while the next 1,000-Hz increase spans about 355.09 mels. Equal physical-frequency increments do not produce equal increments on this transformed scale.
Conversely, 1,500 mels maps to approximately 1,949.31 Hz using the inverse formula. These values are calculated from the chosen convention, not measured from a listener. A different mel convention can produce different numeric coordinates. Nor do the values specify loudness: the amplitude of the sound is absent from this frequency conversion.
Illustrative case study
A fictional team moves a speech model from a research notebook into a production service. Both environments report an eighty-band mel feature input, so the team initially assumes their preprocessing is equivalent.
A controlled comparison reveals that the environments use different mel-scale and filter-normalization settings. The team aligns those settings with the model's expected configuration and also checks sample rate, frequency limits, analysis windows and logarithmic scaling.
The lesson is that matching a feature's name and array size is insufficient to reproduce its meaning. The fictional scenario illustrates a compatibility check without claiming that a specific library is incorrect or reporting a measured recognition improvement. Each configuration may be valid for its own intended use.
Common misconceptions and mistakes
- Mel and hertz are interchangeable labels. They describe different frequency scales.
- Mel measures loudness. Its motivation concerns pitch-related frequency representation.
- Every mel implementation gives identical values. HTK-style and Slaney-style conventions differ.
- A mel spectrogram is just a pitch track. It represents bandwise spectral information across time, not merely one fundamental-frequency estimate per frame.
Business use
Business teams may encounter mel features when integrating speech recognition, voice synthesis or audio classification. The practical issue is consistent preprocessing, not choosing a feature name that sounds more human-like.
Require the deployment configuration to match the model's documented expectations and verify it on representative audio. Keep feature extraction versioned with the model, since a changed frontend can alter behavior without changing the model weights. When comparing vendors, evaluate actual task performance and input conditions rather than assuming that mel-based systems have identical quality or that the scale itself guarantees natural speech.
People also ask
Does 1,000 Hz correspond to 1,000 mels?
Approximately in the common HTK-style mapping given here; numeric conventions should still be stated.
Is log-mel the same as MFCC?
No. MFCC computation includes a further cepstral transformation of log-mel information.
Does a mel filter bank change the original recording's sample rate?
Not by itself. It transforms a spectral representation; waveform resampling is a separate operation.
Check your understanding
A system has eighty mel bands. Does that number alone determine the exact acoustic features supplied to its model?
Answer: No. Frequency limits, mel convention, filter normalization, spectral extraction and magnitude scaling also affect the representation.
Related terms
- Pitch
- Spectrogram
- hertz
- mel scale
- filter bank
- log-mel features
- MFCC
- frequency resolution
- acoustic frontend
Learn next
Convert several frequencies using a stated mel formula and compare their spacing. Then inspect a feature-extraction configuration and separate frequency-axis choices from logarithmic magnitude scaling and time-window choices.
More in Natural language and speech
- Maxim, Gricean - A Gricean maxim is a conversational expectation used in H. P. Grice's account of how people interpret what others communicate beyond literal wording.
- Maximum spanning tree - A maximum spanning tree is a tree that connects every vertex of a weighted graph while maximizing the sum of its selected edge weights.
- MBR - MBR stands for minimum Bayes risk.
- Mention detection - Mention detection is the task of identifying the text spans that refer to entities, or that count as mentions under a specified annotation scheme.
- Mention-pair - Mention-pair is a coreference modeling approach that classifies a pair of textual mentions as referring, or not referring, to the same entity.
- Mentions
Sources
Jurafsky and Martin, Speech and Language Processing, archived August 2025 Chapter 14: https://web.stanford.edu/~jurafsky/slp3/old_aug25/14.pdf. Perceptual scale and mel filter banks. Torchaudio, melscale_fbanks: https://docs.pytorch.org/audio/main/generated/torchaudio.functional.melscale_fbanks.html, with linked implementation. HTK/Slaney choices and the conversion formula were reviewed. Numerical examples are original executed calculations.
Previous: Mehrotra predictor - corrector method Next: Mel-frequency cepstral coefficient