audio.cihat.dev

Spectrogram

See sound as a picture: time across, frequency up, loudness as brightness. Live from the microphone or from a file.

Show

Your browser will ask for the microphone. Sound is analysed on this page and never recorded or sent anywhere.

Point at the spectrogram to read the frequency and the nearest note.

Frequency axis

How to use it

  1. Choose the microphone for a live, scrolling view, or a file to draw the whole recording at once.
  2. Pick a logarithmic axis for music and speech (each octave gets the same height) or linear for technical work, and set the top frequency.
  3. Point at any spot to read its time, frequency and nearest note. Lower the darkest level to reveal quiet detail, then save the image as a PNG.

How a spectrogram is made

The sound is cut into overlapping slices of 2048 samples, about 43 ms at 48 kHz. Each slice is shaped with a Hann window and passed through a fast Fourier transform, which splits it into 1024 frequency bands about 23 Hz wide at 48 kHz. Each band’s strength becomes the brightness of one column of pixels, and the columns side by side make the picture.

That slice length is a trade-off every spectrogram makes: longer slices separate close frequencies better but blur fast changes in time, and shorter slices do the opposite. 2048 samples suits music and voices.

What to look for

A sung or played note shows as a stack of horizontal lines: the fundamental at the bottom and its harmonics at whole-number multiples above it. Speech shows vowels as bands of harmonics and consonants such as “s” and “sh” as noisy smears above 3 kHz. A steady hum shows as a single flat line, often at 50 or 60 Hz and its multiples. Hidden images placed in audio show up on the linear axis with a high top frequency.

Questions people ask

What does a spectrogram show?

How much energy a sound has at each frequency over time. The horizontal axis is time, the vertical axis is frequency and the brightness is the level.

Can I see a spectrogram of an MP3?

Yes. Switch to An audio file and open the MP3; the whole file is drawn at once and you can save the picture.

Logarithmic or linear axis?

Logarithmic matches how we hear pitch, so octaves are evenly spaced; use it for music and voice. Linear spaces every hertz equally and shows high frequencies in more detail.

Is the audio uploaded?

No. The microphone and the files are analysed in your browser and nothing is sent anywhere.

Why is there nothing above a certain frequency?

Compressed formats such as MP3 often cut everything above 16 to 20 kHz, and the top frequency setting limits the view. A file cannot hold frequencies above half its sample rate.