Spectrogram hop size is the number of samples between successive analysis windows. Overlap describes how much neighboring windows share. With a 2,048-sample window and a 512-sample hop, the two windows share 1,536 samples, which is 75% overlap. A smaller hop gives more time columns while the analysis window still controls how much audio each column measures.
Convert Hop Size to Time Between Frames
Use frame spacing in seconds = hop samples ÷ sample rate. At 48,000 samples per second, a hop of 512 samples gives about 10.67 milliseconds between frames. With a 2,048-sample window, each frame spans about 42.67 milliseconds of audio. Adjacent frame placements can be close even when their windows are much longer.
| Hop with a 2,048-sample window | Overlap | Frame spacing at 48 kHz |
|---|---|---|
| 2,048 samples | 0% | 42.67 ms |
| 1,024 samples | 50% | 21.33 ms |
| 512 samples | 75% | 10.67 ms |
| 256 samples | 87.5% | 5.33 ms |
For hops at or below the analysis window length, use overlap percentage = 100 × (1 − hop ÷ window length). Use the number of real audio samples in the window. Zero padding can make the FFT length larger than the window length without changing how many samples the windows share.
Understand Why More Columns Can Look Smoother
A small hop samples the changing spectrum more often. When a band moves up or down quickly, more columns can make the path easier to follow. The overlapping frames still describe much of the same audio. Treat the resulting points as closely spaced estimates from shared data.
If you halve the hop from 512 to 256 samples at 48 kHz, frames arrive about twice as often. Each frame still spans 42.67 milliseconds with the same window. Frequency bins also remain spaced the same if the sample rate and FFT length stay fixed. The FFT size and resolution guide explains those separate choices.
Find a Brief Event Without Overreading Its Width
Suppose a short click occurs at 0.50 seconds. With a 42.67 ms analysis window, several frames can include some of the click, especially with a short hop. Its visible trace can span more time than the sound itself. The first column can appear before the click if columns use a center time and the window includes later samples.
Locate the click in the spectrogram viewer for transient timing and compare it with playback. If you need a close edit point, use a sample-level waveform as explained in waveform versus spectrogram. Check whether frame times are anchored to the start or center of a window if the tool documents it.
Choose Hop and Window for the Task
For a steady hum, a longer window can help with frequency detail. A modest hop can still show whether the band persists. For quick speech sounds or clicks, a shorter window can localize the event better in time, and a smaller hop can help reveal how the spectrum evolves. Test both settings on the same excerpt.
More overlap usually means more computation. In a live browser tool, drawing or analysis can run at separate rates. If the view stutters on mobile, shorten the analysis span or try a less demanding setting if controls are available. The number of drawn pixels alone may not reveal how many frames were measured.
Record the Timing Conventions With the Image
Save the sample rate, window length, hop and relevant source times. For example, use “48 kHz, 2,048-sample window, 512-sample hop, approximately 10.67 ms frame spacing.” Mention whether the export uses the original time or a new time origin from a clip. The spectrogram image export guide covers how to label those choices.
Compare two results at the same time boundaries if you change overlap. Check which difference comes from denser placement and which comes from changes to the window or display. A steady test with a quiet gap can make this easier. See how to test a spectrogram with a known tone for a reproducible sequence.
Compare a Boundary With a Known Offset
When you crop a file, keep the original start time. A hit 0.50 seconds into an excerpt that starts at 8.0 seconds sits at 8.50 seconds in the full file. Compare exported frame times using one time origin before deciding whether the crop changed the measured location.
Further reading
SciPy reference for STFT windows, hop size and frequency spacing
Frequently Asked Questions
Does a smaller hop improve frequency resolution?
It increases how often the tool samples the spectrum over time. Frequency resolution depends on the analysis window and signal, while FFT bin spacing depends on the FFT length and sample rate.
Is hop size the same as the time axis pixel width?
They describe different parts of the display. Hop controls analysis frame spacing. Pixel width depends on zoom and rendering, so one screen column can show one frame, parts of a frame or several combined frames.
Can a window have zero overlap?
Yes. A hop equal to the window length puts each window immediately after the previous one. Adjacent frames share no input samples. Overlap can give a denser view of events around the boundaries.