Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [stft]

Short-Time Fourier Transform

Filter by
Sorted by
Tagged with
6 votes
3 answers
1k views

Role of window length and overlap in uncertainty principle?

I am trying to predict epilepsy using spectrograms and a convolutional neural network. So far I have achieved a validation accuracy of 86% which i feel like is pretty good. Lots of the papers doing ...
niklas Munkholm Hjort's user avatar
6 votes
1 answer
657 views

Equivalence between "windowed Fourier transform" and STFT as convolutions/filtering

I've heard, that "windowed Fourier transform" is but one perspective on STFT, and that STFT is fundamentally convolutions of windowed complex sinusoids with the input, i.e. bandpass ...
OverLordGoldDragon's user avatar
5 votes
3 answers
1k views

Is "Windowed Fourier Transform" a synonym for "STFT"?

Sometimes I find the notation WFT (Windowed Fourier Transform) while other times I see STFT (Short Time Fourier Transform). Are they the same?
Diego Sacconi's user avatar
3 votes
2 answers
1k views

Amplitude extraction using STFT

I'm trying to recover amplitude/magnitude from an audio stream. I'm using FFT to go from time domain to frequency. If I feed in a signal of known amplitude, the results I get from either windowing or ...
dizzy's user avatar
  • 253
11 votes
4 answers
5k views

What's the difference between the Gabor-Morlet wavelet transform and the constant-Q transform?

At a glance, the constant-Q fourier transform and the complex Gabor-Morlet wavelet transform seem the same. Both are time-frequency representations, based on constant-Q filters, windowed sinusoids, ...
endolith's user avatar
  • 15.8k
11 votes
3 answers
18k views

STFT: why overlapping the window?

For STFT, we impose window of certain size onto the original signal, then we perform fft on each window. The uncertanty about frequency and time is determined by the width of the window, however, I ...
kuku's user avatar
  • 273
3 votes
0 answers
283 views

Segment/Idenfication of signal from a spectrogram

I have the following Spectrogram of a signal: Essentially, in this signal, I know there is one point of interest (between 60-80) and between the the particular frequencies. I could, potentially ...
Phorce's user avatar
  • 520
1 vote
2 answers
2k views

What is the advantage of overlapping windows while evaluating Spectrogram?

I've seen many documents that refer to calculate spectrogram through overlapping windows but haven't found clear documents on why this is done and how to calculate the number of points that need to be ...
Sadat Rafi's user avatar
6 votes
4 answers
18k views

Choosing the right overlap for a window function

On Wikipedia there is quite a list of window functions. However, when you are doing a lot of STFTs, you often have to have some overlap to get better results. Generally an overlap factor of 2 (i.e., ...
Jean-Michaël Celerier's user avatar
5 votes
4 answers
57k views

FFT to spectrum in decibel

Here is a 10 seconds-long 440hz sine wave normalized at $0\textrm{ dBFS}$. When computing the STFT (with the code below) of this audio file, I noticed that ...
Basj's user avatar
  • 1,277
4 votes
2 answers
1k views

STFT calculation with Gaussian Window

$$ f(t)=\exp(jat^2) \,\,\, and \,\,\, g(t)\,\,is\,\, a\,\, Gaussian\,\, Window:$$ $$ g(t)= \left (πσ^2\right)^{\frac{-1}{4}}\exp\left (\frac{-t^2}{2σ^2} \right ) , \,\,\,\,\,\,\left \|g(t) \right \|=...
MJ13's user avatar
  • 285
0 votes
2 answers
4k views

Wav To Spectrogram, Back To Wav

Currently, I'm writing a Python script, which should do the following: read an audio file respectively a wav file via scipy.io.wavfile.read(). calculate the spectrogram of given wav file. write the ...
Nico's user avatar
  • 1
14 votes
3 answers
5k views

STFT and DWT (Wavelets)

STFT can be successfully used on sound data (with a .wav soundfile for example) in order to do some frequency-domain modifications (example : noise removal). With ...
Basj's user avatar
  • 1,277
2 votes
2 answers
1k views

Wigner-Ville Distribution (WVD) vs STFT for Spectral Analysis

What are the Pros and Cons of using Wigner-Ville Distribution for spectral analysis of a signal vs taking the STFT. When is it appropriate to use one over the other and is WVD used in real-time ...
malik12's user avatar
  • 488
0 votes
1 answer
114 views

Unwindowed STFT of sine, closed form solution and insights (sliding FFT)

I seek to calculate, mathematically, the unwindowed Short-Time Fourier Transform of $$ \cos(2\pi f t + \phi) $$ i.e. any arbitrary real-valued sine: any frequency, duration, phase shift, and number of ...
OverLordGoldDragon's user avatar
22 votes
2 answers
12k views

Inverse Short Time Fourier Transform algorithm described in words

I'm trying to conceptually understand what is happening when the forward and inverse Short Time Fourier Transforms (STFT) are applied to a discrete time-domain signal. I've found the classic paper by ...
Nicholas Kinar's user avatar
19 votes
5 answers
21k views

How do I optimize the window lengths in STFT?

I have many EEG signals and I want to analyze them using linear methods such as STFT (Short Time Fourier Transform). In STFT , How can I optimize the analysis window length, to reflect the frequency ...
Maen's user avatar
  • 191
14 votes
1 answer
16k views

Comparison between Fourier transform, short-time Fourier transform and wavelets

What is the difference between the Fourier transform, short-time Fourier transform and wavelets?
student's user avatar
  • 141
14 votes
4 answers
17k views

Can you increase frequency resolution of FFT without increasing window size?

I'd like to use STFT for multipitch analysis. I realise detecting the partials existing in the signal is just the beginning. Still I have problem with it. Let's say I have signal sampled with 'CD' ...
nuoritoveri's user avatar
9 votes
1 answer
3k views

What is the maximal frequency resolution for Matlab's STFT implementation spectrogram()?

Matlab's spectrogram() function calculates the STFT of a signal. It describes its NFFT argument as follows: ...
Andreas's user avatar
  • 1,968
8 votes
3 answers
439 views

How critical is the selection of the window function in STFTs?

I have a sum of periodic signals that I am trying to untangle using time-frequency analysis. I seem to get wildly different results depending on the window length and shape. This is a problem because ...
Emre's user avatar
  • 2,877
8 votes
2 answers
2k views

Signal processing techniques for an accelerometer signal?

I am running some tests where I am recording accelerometer measurements. I am looking to use elements of signal processing on this signal, but I am unsure about where to begin, or what my approach ...
Gary's user avatar
  • 345
5 votes
4 answers
801 views

Why are there beats in spectrogram / Windowed Fourier Transform of sines?

I am trying to understand how the Windowed Fourier transform works, so I used Matlab to create an artificial signal, and plotted the Windowed Fourier transform using a gaussian window. $x(t) = \left\...
meta_warrior's user avatar
5 votes
2 answers
4k views

Meaning of Hop-Size in Filter Bank Interpretation of Short Term Fourier Transform

The Short Term Fourier Transform (STFT) is used to obtain the time-varying spectrum from a signal. There are two ways to understand it - the overlap add interpretation, and the filter bank ...
Samyukta Ramnath's user avatar
4 votes
3 answers
11k views

Understanding overlapping in STFT

I understand the concept of the STFT. In order to avoid spectral leakage, you use a Hann window that overlaps by 50%. However, the problem that I have, is that the example code online does not account ...
John Menoso's user avatar
4 votes
3 answers
17k views

Window period(overlap) and FFT

How does changing the window period (i.e the number of points overlap between two frames) affect the FFT results ? Suppose that a time series signal was converted to frequency domain by FFT with ...
Kanmani's user avatar
  • 151
4 votes
3 answers
4k views

What is the relation between windowing and hopping in audio DSP

While using short-time Fourier transform (STFT), it is common to use window function, usually tapered. Will this not alter the original signal $x[n]$ and the STFT may no more be the true STFT of $x[...
Aravinda Murthy's user avatar
4 votes
3 answers
5k views

Filtering with STFT

I have sucessfully implemented a STFT (+inverseSTFT with perfect reconstruction of original signal, with overlap add, etc.) in order to work on audio files. Using this STFT / iSTFT framework, I have ...
Basj's user avatar
  • 1,277
4 votes
2 answers
982 views

How does the effect of windowing change with the phase of the input signal?

I am calculating the SNR (signal power to noise power) for a sine wave. I don't have an integer number of periods in the waveform being analyzed, so I am using a flattop window to reduce spectral ...
DavidG25's user avatar
  • 119
3 votes
1 answer
529 views

CMV: COLA constraint is not necessary

In the literature on the short-time Fourier transform (STFT) it is often stated or implied that the constant overlap-add (COLA) constraint must be satisfied in order for the STFT to be invertible. ...
gauss256's user avatar
  • 131
3 votes
1 answer
3k views

length of window and overlap rate in STFT

I want to use STFT to analyze my signal and am wondering what are differences between two solutions: Use short windows (for ex. 256 samples window) Use longer windows (to get higher resolution in ...
Mai's user avatar
  • 329
3 votes
0 answers
448 views

Why are the frequencies associated with the STFT bins not representative of the energy?

I'm experimenting with a 30 Hz sine wave and I want to extract the frequencies of this, and have implemented the algorithm to do so. This gives a correct reading, well, gives 29 Hz. I'm now wanting ...
Phorce's user avatar
  • 520
3 votes
5 answers
2k views

How to interpret the effect of different windows in short time fourier transform?

There are many categories of windows, e.g., rectangular, Gaussian, and triangular. What are their effects on STFT?
ZHUANG's user avatar
  • 169
3 votes
2 answers
2k views

Combining spectrograms with different windows to getting arbitrary time and frequency resolution

Spectrograms convert an amplitude-time signal into a frequency-time signal using Short Time Fourier Transform (STFT). The window size L used in STFT is a design choice. As L increases, you get higher ...
user3768533's user avatar
3 votes
1 answer
1k views

Should I ever pick the continuous wavelet transform over the discrete one? DWT vs CWT vs STFT

Of course I mean in terms of numerical algorithms. I'm reading various papers on the wavelet transform and why it's better than the short-time Fourier one. The reason that's cited more often is that ...
a meme's user avatar
  • 31
2 votes
3 answers
8k views

Librosa stft + istft - Understanding my output (which always seems too perfect) at varying window lengths

I've just started to use Python with Librosa for a DSP project I'll be working on. First thing I've been trying to do is determine my preferred parameters for the FFT window size, and hop-distance. ...
Dave Anderson's user avatar
2 votes
2 answers
690 views

How to train a FCNN with Spectrogram images?

I'm working on a audio dereverberation deep learning model, based on the U-net architecture. The idea of my project came from image denoising with auto-encoders. I feed the reverberated spectrogram to ...
Lorenzoncina's user avatar
2 votes
1 answer
313 views

Window with optimal sidelobes for a given ENBW / frequency-resolution

Is there a family of windows which is "optimal" in terms of energy above/below a boundary, but with controllable ENBW/bandwidth? By optimal, I mean maximising energy concentration inside ...
cloudfeet's user avatar
  • 301
1 vote
0 answers
383 views

Zero STFT bins (and not FFT bins)

Filtering by taking FFT, zeroing bins, and inverse FFT is a bad idea, as discussed here. But what about: take a STFT, (i.e. multiply the input signal by moving window function, and take FFT) zero ...
Basj's user avatar
  • 1,277
1 vote
1 answer
1k views

Computing narrowband spectrograms using MATLAB [closed]

I'm having an assignment of computing narrowband spectrograms using MATLAB. And I totally have no idea about the code. Can someone help me writing the code and explaining what's going on to me. Lots ...
yyy's user avatar
  • 29
1 vote
1 answer
1k views

How do I find the power of a specific frequency at a specific sample of a discrete time varying signal?

EDIT: First off let me explain that I understand that frequency makes no sense for a single sample. What I am actually talking about is the power spectrum within a short time window around a specific ...
Andy's user avatar
  • 1,783
1 vote
1 answer
1k views

Shift property of the Short-term Fourier transform (STFT)

Properties of STFT (Short-term Fourier transform) say that it preserves time shift up to modulation. Does it mean it is sensitive to time-shift in signal?
user23380's user avatar
1 vote
1 answer
212 views

Classifying STFT from multiple signal samples

I have a collection of signals (IQ wav) split up into ~2s samples of sampling rate 2MHz, and can collect the STFT information from these samples through the following code: ...
rshah's user avatar
  • 77
1 vote
2 answers
523 views

STFT with varying window lengths (like the continuous wavelet transform)

I was wondering if it is possible to use windows of varying lengths when making a spectrogram based on the short-time Fourier transform (STFT). That is, for higher frequencies I would use shorter ...
scho's user avatar
  • 25
1 vote
2 answers
164 views

STFT needs circular shift or not?

In some textbooks and websites, circular shift operation is done before doing FFT of windowed data, in the explaination, circular shift is to ensure zero-phase. But in other textbooks and websites(I ...
Xiong's user avatar
  • 41
1 vote
2 answers
993 views

Scipy and Matlab Spectrogram not matching

I am trying to replicate a spectrogram from MATLAB in Python. I've read other posts but they either don't use complex data or the data doesn't match between languages. I've defined my FFT length (<...
PrematureCorn's user avatar
1 vote
0 answers
80 views

How to deal with phase incoherence issues after manipulating a signal in the frequency domain?

Let's say that we want to manipulate a signal in the frequency domain using a short time Fourier transform and once we're done , we use an inverse STFT (plus overlap and save) to convert the results ...
dsp_user's user avatar
  • 921
1 vote
0 answers
84 views

Modified STFT resynthesis

This post is basically a follow-up to my recent question, which I asked here How to deal with phase incoherence issues after manipulating a signal in the frequency domain? In short, I'm modifying the ...
dsp_user's user avatar
  • 921
1 vote
2 answers
2k views

Short-time Fourier transform Tradeoffs

In the Short-time Fourier transform what are the tradeoffs between different: window functions window lengths sample rates
Tom Huntington's user avatar
0 votes
1 answer
104 views

STFT Audio processing with zeros

In this paper they preprocess an audio file with a STFT and then apply two equations to the computed matrix. I tried implementing all of it in python and used librosa for the STFT. The issue I ...
Rocket's user avatar
  • 25