Questions tagged [stft]
Short-Time Fourier Transform
314
questions
22
votes
2
answers
11k
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 ...
19
votes
5
answers
20k
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 ...
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?
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' ...
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 ...
11
votes
2
answers
4k
views
Real-Time Human Pitch Detection
I'm trying to implement a singing game that will analise raw mic input and tell the player how good is he singing. That needs to be done in real-time.
I've come across a lot of threads asking the ...
11
votes
3
answers
17k
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 ...
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, ...
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:
...
8
votes
4
answers
2k
views
Advantage of STFT over wavelet transform
I have learned about STFT and wavelet transform recently, and wavelet transform seems better than STFT in my opinion.
So, I wonder if there is any advantage of using STFT than WT, and if so, what are ...
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 ...
8
votes
2
answers
2k
views
Time resolution of the Short Time Fourier Transform (STFT)
I'm struggling to figure out how the time points of an STFT are calculated, and I can't find a definitive answer. Let's say I have a 4Hz stationary signal and I'm going to use a 64 second window with ...
8
votes
3
answers
435
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 ...
8
votes
5
answers
11k
views
What is really the Mel-filterbank?
After applying STFT to a signal, you typically need to convert the frequencies to the Mel scale. Typically the frequency values range from $0$ to $N/2$, where $N$ is the width of each sliding window.
...
8
votes
1
answer
1k
views
Least Squares Re Synthesis of Short Time Fourier Transform (STFT)
Working with my own MATLAB implementation of the short-time Fourier transform (STFT), I've managed to write code for the analysis step where a 1D time-domain signal $s[t]$ is progressively windowed, ...
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., ...
6
votes
1
answer
568
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 ...
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 ...
6
votes
1
answer
6k
views
STFT amplitude normalization, librosa library
So librosa.core.stft returns a complex single sided spectrogram.
My question is:
What normalization of the amplitude values should I perform afterwards?
I believe I have to multiply the amplitude ...
6
votes
2
answers
7k
views
Wavelet Transform and STFT
How wavelet transform is different from STFT.
I'm not able to understand what is resolution in frequency domain means?
6
votes
3
answers
381
views
In the formula for the windowed Fourier transform, why is the complex-exponential term not time-shifted to the position of the window?
I have a question about the "windowed / short-time / short-term" Fourier transform that is somewhat perplexing me. I have now added an Addendum at the bottom, where the issue is presented more ...
5
votes
4
answers
790
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\...
5
votes
4
answers
56k
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 ...
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?
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 ...
5
votes
1
answer
5k
views
STFT Window Size is 2048, Why is the output 1025?
I feel like I am having a brainfart over here and can't seem to remember what's going on with STFT outputs.
Consider these two lines of code from the Python library Librosa:
...
5
votes
1
answer
828
views
How to reduce synthesis artifacts produced by phase vocoder?
I implemented the phase vocoder algorithm in Python to time-stretch speech signals by following this paper and referring to this MATLAB tutorial. I can distinguish words in the original signal from ...
5
votes
1
answer
103
views
Interpolation of STFT between time and frequency bins
I am trying to identify and remove airplanes in a time series obtained at a radio meteor receiver. Here we have a spectrogram which displays the power content of my signal as a function of frequency ...
4
votes
2
answers
882
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 ...
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 ...
4
votes
1
answer
6k
views
What is first order difference?
I don't understand what is a first order sequence. For more context: I am reading a paper where the author extracts different sequences (in the STFT domain) and then "The resulting sequences are ...
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 ...
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 ...
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 \|=...
4
votes
1
answer
3k
views
Is it possible to recover a waveform from spectrograms of magnitude *and* phase?
It is my rough understanding that a typical spectrogram discards phase information by squaring only the real-valued part (magnitude) of the STFT (I know it's not quite this simple, but feel free to ...
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[...
4
votes
2
answers
825
views
How to calculate short-time fourier transform (STFT) when the window length is greater or smaller than the FFT size?
I have been trying to understand the weighted overlap-add (WOLA) method. By searching papers and posts in dsp.SE, I found that the window length can be larger and smaller than the FFT size.
1. Window ...
4
votes
1
answer
568
views
Detecting background noise from audio time-freq domain analysis
I have a requirement to detect/reduce sidetalk/background noise in real-time audio. I am stuck in how can I detect this from audio time-frequency domain analysis. I am already getting the time-freq ...
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?
3
votes
4
answers
3k
views
How to derive the bin width / maximum frequency of DFT/STFT
The bin width is given by the $F_s / N$ and the maximum frequency is given by $F_s / 2$ where $F_s$ is the sample rate and $N$ is the number of samples of the DFT.
Going between these is trivial, but ...
3
votes
2
answers
349
views
What is the cause of STFT artifacts when different signals overlap?
I'm trying to learn about why signals that cross in an STFT cause apparent artifacts in the magnitude. I've been looking at the example below, written in python, where a gaussian peak overlaps with a ...
3
votes
1
answer
4k
views
Confusion with regards to STFT and MFCCs
I'm wondering if someone can clear the following up for me as I'm having a difficult time understanding the concept.
I'm looking to implement and learn about the processes and uses using short-time ...
3
votes
3
answers
396
views
Does it make sense to use a wavelet that is equal to a sine of one period?
Would I get same results with STFT method (short-time Fourier transform) if I try this?
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 ...
3
votes
2
answers
410
views
Why does Matlab spectrogram look stripy when windowed input is zero-padded?
I am working on a little project, and stumpled upon something I cannot understand yet. I am learning cognitive science, and don't have DSP knowledge background, only learning from what I find on the ...
3
votes
3
answers
3k
views
Difference between librosa.stft and scipy.signal.stft
I read the source code of librosa.stft and sicpy.signal.stft, and notice that the calculation results of STFT in these two libraries are quite different:
In scipy.signal.stft, the stft result is ...
3
votes
1
answer
2k
views
Illustration of time domain aliasing cancellation (TDAC, MDCT, lapped transform)
Can someone find or make a visual illustration of how time domain aliasing cancellation works in lapped transforms such as the MDCT? I think a graphic would make it a lot easier to understand, and I ...
3
votes
2
answers
357
views
Optimize window length (STFT) via gradient descent (in neural networks)
The authors from this paper optimized a Gaussian window size via gradient descent (the σ parameter of the bell curve) together with the other parameters of neural networks.
I don't use Gaussian window ...
3
votes
1
answer
1k
views
Approximation of Hilbert Transform Using Very Short Hilbert Transform FIR / IIR Filter
Hilbert transform is a quite sensitive topic here, since Gabor's paper, Theory of Communication, J. Inst. Electr. Engineering, London, 1946. Perhaps even more important than the Fourier transform.
...
3
votes
1
answer
2k
views
Onset Detection for Audio Signals
I am having a problem understanding how the author gets the onset envelope of an audio song in this paper.
The entire section in question has been quoted below:
First the input sound is resampled ...