# Spectrogram vs Mel Spectrogram: Key Differences

Learn the difference between a spectrogram and a mel spectrogram. See how the mel scale changes the frequency axis for audio machine learning features.

A spectrogram shows sound energy across linear frequencies over time, while a mel spectrogram warps that axis to a perceptual pitch scale. The difference matters when you choose audio machine learning features. A standard spectrogram keeps equal hertz spacing on its frequency axis. A mel spectrogram compresses higher frequencies and expands lower ones to match how humans hear. 

## Linear Frequency in a Standard Spectrogram 

A standard spectrogram uses a linear frequency axis. Each vertical step represents the same number of hertz. This gives equal space to every frequency band. It suits tasks where exact pitch placement is important. 

## Mel Scale Warps the Frequency Axis 

A mel spectrogram converts frequencies to the mel scale. The mel scale approximates human pitch perception. Low frequencies get more resolution than high frequencies. This mirrors how the human ear separates tones. 

## Use Cases for Audio Machine Learning Features 

Mel spectrograms are a common input for audio machine learning features. Many speech and music models prefer this representation. It reduces high-frequency detail that humans hear less well. Standard spectrograms remain useful for visual analysis and precise measurement. 

## Spectrogram and Mel Spectrogram Questions 

### What is the difference between spectrogram and mel spectrogram? 

The difference is in the frequency axis. A spectrogram uses a linear frequency scale with equal hertz spacing. A mel spectrogram uses the mel scale, which is based on human pitch perception. This warps the axis to give more space to low frequencies. 

### Why use a mel spectrogram for audio machine learning? 

Mel spectrograms work well for audio machine learning features. They match how people perceive pitch more closely than linear frequency. This often helps models learn useful patterns from sound. Many speech and music systems rely on mel spectrograms. 

### Does a mel spectrogram show time on the same axis as a spectrogram? 

Yes, both show time on the horizontal axis. The vertical axis is frequency on a spectrogram and mel frequency on a mel spectrogram. Color or brightness indicates energy at each time and frequency. Time resolution depends on the analysis window. 

### Can you convert a spectrogram to a mel spectrogram? 

Converting a spectrogram to a mel spectrogram is a standard step. You apply a filter bank to map linear frequencies to the mel scale. This reduces the number of frequency bins. The result is a lower-dimensional representation suited to machine learning.
