Skip to main content

# Questions tagged [stft]

Short-Time Fourier Transform

318 questions
Filter by
Sorted by
Tagged with
1 vote
1 answer
37 views

### Differences between STFT and DGT

What’s the main difference between short-time Fourier transform (STFT) and discrete Gabor transform (DGT)? Based on the definitions in the Wikipedia page (and other textbooks), it seems that they are ...
• 524
0 votes
0 answers
55 views

### Wavelets vs Windowed Fourier

Are there any good simple examples where wavelet scalograms provide more information than windowed fourier? P.s It would be even cooler if there was an example of what cannot be obtained from a ...
1 vote
1 answer
56 views

### Why do we care about the STFT of a signal?

As far as I know, the STFT is used to analyze the frequency content of a non-stationary signal - a signal whose frequency varies with time. For example, a signal like this: - Performing the DFT on ...
• 436
0 votes
0 answers
53 views

### Invertible Multi-band STFT (one spectrogram, N different time/frequency resolutions)

I'm working on an ML model that edits audio spectrograms which are then inverted. The problem is too many channels (and so too much compute) are dedicated frequencies that don't really matter much to ...
0 votes
0 answers
33 views

### Definition of an adaptive threshold for signal detection

Good day. I would like to try to create a signal detection algorithm based on STFT. I am interested in the implementation of an adaptive detection threshold that will be determined per bin (by ...
• 1
0 votes
0 answers
74 views

### writing from STFT to audio using ISTFT adding harmonics to audio not present before

I'm doing quite a bit of the samething as I wrote in this post here : Shifting frequency peaks such that w[i] moves to w[i/n] using STFT and IFFT I'll quote from it here to present the issue I now ...
• 103
0 votes
0 answers
48 views

### Shifting frequency peaks such that w[i] moves to w[i/n] using STFT and IFFT

I am trying to do a kind of frequency compression on say 20 most energetic frequencies in a particular slice of a STFT. If w[i] is the frequency peak for a slice of STFT at a particular time, then I ...
• 103
0 votes
0 answers
12 views

### Calculating PSNR using STFT of sampled signal

I have a baseband IQ sampled signal from a Pluto SDR with a bandwidth B and also fs = B, how can I calculate its PSNR using the STFT of the signal in Matlab. Do I need to take into account the RBW of ...
1 vote
1 answer
83 views

### Window Type Effect on Pwelch vs ShortTimeFFT PSD Result?

I am trying to make sure I understand the output scaling of pwelch. I am using the PWelch function to compute the PSD of a signal and I have manually computed the PSD from an STFT output. The results ...
• 13
5 votes
1 answer
141 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 ...
• 51
2 votes
1 answer
161 views

### what does librosa.stft do that makes it different?

My understanding of the Short Time Fourier Transform is that first I need to frame the signal and window it, after that apply an fft on these windowed frames. Using Librosa: ...
1 vote
0 answers
106 views

### Advantage and Disadvantage using Mel Spectrograms over STFT in speech/waveform synthesis

I want to ask you a question about the waveform synthesis or more spesifically speech synthesis. Most of the state-of-the art papers use mel-spectrograms as their inputs, because it mimics the human ...
1 vote
0 answers
110 views

### STFT normalization

In Scipy's implementation of STFT, an argument allows to scale the result as a spectrum or as a psd : ...
• 51
3 votes
2 answers
158 views

### Why not overlap save for inverse stft

Since STFT uses overlapped sections of the input signals and compute DFT, it resembles overlap-save method used for block convolution, instead the overlap-add method for block convolution uses non-...
• 31
1 vote
1 answer
157 views

### reproduce Scipy's stft

I failed to reproduce Scipy's stft. When I have tried to remove all the possible modifications and go the minimal example, I converge to the following: ...
• 1,211
1 vote
0 answers
265 views

### How to implement STFT for processing audio [closed]

I should start this off by saying I’m a hobbyist and by no means a student. I’ve been reading “The Audio Programming Book”, and attempting to implement STFT on the stm32 based Daisy platform. In order ...
2 votes
1 answer
387 views

### What is the difference between STFT and Gabor filter?

My understanding is that a Gabor filter gives us information about when in the input signal does the frequency of interest (equal to the frequency of the sinusoid in the Gabor Filter) occur, thus ...
2 votes
1 answer
81 views

### Comparing results for spectrum generating in matlab using STFT and Filterbank approach

To analyse data in the frequency domain I often use functions like stft() in Matlab. Inspired by this video and this article I have compared the results of ...
• 380
1 vote
2 answers
330 views

### Overall spectrum computation from Short-Time-Fourier-Transform

I am trying to computing the overall spectrum of a given signal from its Short-Time-Fourier-Transform. I am using python to do this and I wrote my function to compute the STFT: ...
• 113
0 votes
1 answer
123 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 ...
• 9,024
3 votes
0 answers
71 views

### Artifact during this STFT spectrogram plotting

I am new to the field of DSP and I am currently working on implementing a real-time audio spectrogram using STFT technique. While making progress, I have encountered an issue when testing a constant ...
• 131
0 votes
1 answer
107 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 ...
• 25
1 vote
2 answers
195 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 ...
• 51
1 vote
3 answers
428 views

### Increasing STFT resolution by repeating the window? Ways to improve STFT resolution?

In theory of FT(Fourier transform) and STFT(Short Time Fourier Transform) it is said that "A narrower window gives good ...
• 135
2 votes
2 answers
123 views

### How would you compute Fourier transform of a real world signal where the signal keeps getting updated (not a static one)?

Crossposted at Electrical Engineering SE A very naive question: How do we use Fourier transform for real world signals - for which you have the information only up to the present instant (and the ...
0 votes
1 answer
312 views

### Construction of Room Impulse Response - Short-Time-Fourier-Transform and Inverse-STFT - Matlab and NWaves (C#) Implementation

Background: I am working on a Unity Project (C#) and implementing a Room Impulse Response synthesis. I do ray tracing to create energy histogram for different bands. With these histograms it is ...
4 votes
2 answers
1k 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 ...
• 119
1 vote
1 answer
323 views

### How do n_fft and win_length determine the window in spectrogram?

I am currently trying to understand librosa.feature.melspectrogram in a mathematical sense. In my understanding, spectrogram is based on the STFT which is for a ...
• 13
1 vote
2 answers
1k 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 (<...
1 vote
0 answers
30 views

### Reconstruction of batch-acquired signal

I am currently working on a project which requires evaluating slow changes over time in the magnitude of a signal's high frequency (over 10 kHz) components. This signal was acquired in tests with a 25....
6 votes
1 answer
754 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 ...
• 9,024
1 vote
0 answers
40 views

### How to calculate phase estimation error

I am working on speech enhancement and I want to compare the phase and magnitude between two signals. I compute the STFT for both, and comparing the magnitudes is easy via mean-squared error or some ...
1 vote
0 answers
39 views

### A mathematical justification of discontinuity detection using STFT

I'm trying to detect rapid changes in a one-dimensional signal say $[0,1]\ni t \mapsto f(t) \in [-1,1]$. By rapid changes, I mean corner points, edges, or sharp transitions at a point for example the ...
• 127
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 ...
• 253
1 vote
1 answer
390 views

### Overlap and Add/Save Inverse Short-Time Fourier transform

Edited for conciseness, please see below: Question: How does overlap and save work, in the context of array buffers? How does overlap and add work? For a specific use case involving STFT, which one is ...
• 27
2 votes
3 answers
787 views

### Does overlapping windows while processing a signal produce a stretched time domain?

I'm very new to signal processing and attempting to implement a spectrogram generator to learn more about DSP in general. So far, I have built up an understanding of how I might do that. Get input ...
• 23
0 votes
0 answers
242 views

### difference in speed between tensorflow implementations of mfcc and stft

I am trying to preprocess audio clips for a keyword spotting task that uses machine learning models. The first step is to calculate the spectrogram starting from the waveform and in order to do so I ...
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 ...
• 488
0 votes
0 answers
60 views

### How to detect "buzz" components in audio by frequency domain analysis

I am trying to detect the amplitude, frequency and phase of the dominant "buzz" in an audio signal. By "buzz" I mean a periodic signal with sharp edges. For example, an impulse ...
• 133
1 vote
1 answer
162 views

### Spectrum analyzer with multirate filter bank

This paper gives a spectrum analyzer using the multirate filter bank technique. The basic idea of the paper is that STFT can be interpretated as a uniform DFT filter bank. But the baseband filter of ...
• 379
1 vote
0 answers
448 views

### How to plot the STFT of a .wav file in GNU Octave?

I'm quite new to signal processing and am trying to find the short time fourier transform of an audio sample and plot it (I believe the best way is as a spectogram?) using Octave (similar to this ...
2 votes
1 answer
830 views

### Choice of relationship between n_fft and window_length in STFT

Not a veteran in Signal Processing, it would be extremely appreciated to help me understand the idea/heuristic behinde the idea in STFT that $$\text{nfft} \ge \text{window length}$$ At least from a ...
3 votes
2 answers
367 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 ...
• 31
1 vote
0 answers
84 views

### STFT for Classification

I am working on this project in which I am using Short Time Fourier Transform (STFT) for feature extraction before applying classification model. I have a time series sensor data, applied signal ...
0 votes
1 answer
338 views

### Why does varying n_fft change the range of x axis values when plotting STFT?

I am using librosa.stft to apply an STFT to an audio sample and display a spectogram of the results when using different sampling windows (...
2 votes
1 answer
276 views

### Why does NMF (Non Negative Matrix Factorization) decompose a spectrogram into time and frequency component?

I compute the NMF over a spectrogram (magnitude of STFT of a signal) in this way: W,H = NMF(MyStft,r) # where r=2 is the rank W and H respectively contain the ...
• 21
0 votes
1 answer
65 views

### Spectrogram of a shock event

I have measured data of a vibration with chirp input were I suspect unwanted shock events occurred. I therefore thought about computing the spectrogram of my time histories to check the frequency ...
• 413
1 vote
1 answer
76 views

### Filterbank Interpretation of Inverse STFT With Hop

The slide below, borrowed from CMU, shows the typical interpretation of the "filterbank interpretation" of signal reconstruction from a Short Time Fourier Transform. As far as I can tell, ...
• 175
4 votes
2 answers
1k 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 ...
• 379
1 vote
0 answers
226 views

### How to create overlapping frames of input signal for stft using HDL coder for FPGA implementation?

I want to implement stft on FPGA. For this purpose I use HDL coder and the problem is I have no idea how to create overlapping frames of data for further FFT. In my example I want to use 256 frame ...