Short-Time Fourier Transform
Short-Time Fourier Transform (STFT) Analysis · Also known as: STFT, Windowed Fourier Transform, Time-Frequency Analysis
The Short-Time Fourier Transform (STFT) is a fundamental signal analysis technique that computes the frequency content of a signal as it evolves over time by applying the Fourier transform to short, overlapping windows of the signal. Introduced conceptually by Dennis Gabor in 1946, the STFT provides a time-frequency representation essential for analyzing non-stationary signals where frequency content changes over time.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use STFT for analyzing non-stationary signals such as music, speech, and biomedical signals where frequency content changes over time. It is ideal for spectrogram visualization, feature extraction for machine learning, and understanding transient events. Avoid STFT when you need very fine frequency resolution with stationary signals—use longer FFTs or Welch's method instead. Also consider wavelets as an alternative with adaptive time-frequency resolution.
Strengths & limitations
- Provides joint time-frequency representation showing how signal frequency content evolves over time
- Straightforward computation using standard FFT algorithms with O(N log N) complexity
- Flexible window function and length choice allows tuning of time-frequency resolution trade-off
- Well-understood visualization via spectrograms, providing intuitive interpretation of signal characteristics
- Foundation for many audio and speech processing techniques (pitch detection, speech recognition, music analysis)
- Subject to time-frequency uncertainty principle: cannot achieve arbitrarily fine resolution in both time and frequency
- Longer windows improve frequency resolution but reduce time localization of transients
- Shorter windows improve temporal resolution but reduce frequency resolution, unable to resolve closely-spaced frequencies
- Spectral leakage and windowing artifacts must be managed through proper window function selection
- Computationally expensive for very long signals or real-time processing with high time-frequency resolution
Frequently asked
How do I choose the STFT window length?
Window length determines the time-frequency trade-off. A rule of thumb is that you need at least 2-3 cycles of the lowest frequency of interest. For music, 512-2048 samples is typical; for speech, 256-512 samples. Shorter windows preserve temporal events; longer windows provide better frequency resolution. Experiment with different lengths and visualize the resulting spectrograms to find the optimal balance for your application.
What window function should I use?
Hann and Hamming windows are good general-purpose choices with reasonable trade-offs between main lobe width and side lobe levels. Blackman windows have lower spectral leakage at the cost of wider main lobe. Rectangular windows should be avoided unless you specifically need frequency response peaks. Choose based on whether you prioritize frequency resolution (wider main lobe acceptable) or spectral leakage reduction (lower side lobes needed).
What is the optimal overlap percentage for STFT?
50% overlap is a common baseline that provides smooth time evolution without gaps or redundancy. For synthesis applications like phase vocoder, 75% overlap (hop size = window/4) often works better. Higher overlap increases computational cost but improves temporal smoothness. Lower overlap reduces computation but may create discontinuities. The optimal choice depends on your specific application and processing needs.
How does STFT relate to spectrograms and other time-frequency representations?
A spectrogram is the magnitude-squared (power) visualization of the STFT. Other time-frequency methods like continuous wavelet transform and Wigner-Ville distribution exist but have different trade-offs. Wavelets adapt resolution to frequency (lower frequencies get better frequency resolution), while STFT maintains fixed resolution. STFT is simpler and computationally more efficient; choose wavelets if you need frequency-dependent resolution.
Sources
How to cite this page
ScholarGate. (2026, June 3). Short-Time Fourier Transform (STFT) Analysis. ScholarGate. https://scholargate.app/en/signal-processing/short-time-fourier-transform
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Blind Source SeparationSignal Processing↔ compare
- FIR Filter DesignSignal Processing↔ compare
- Matched FilterSignal Processing↔ compare
- Power Spectral Density EstimationSignal Processing↔ compare