# 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 length larger than FFT size.

See the comment in this post. It says that "WOLA allows you to use an N-point DFT with an MN-point analysis window". I wonder how one can do a N-point DFT with an MN-point window since the FFT size is N. How many data points in one frame should we use, N or MN? (I know this is possible with DTFT because we can calculate the STFT at N frequency bins using a MN-point DTFT with the definition, but how to do it with FFT?)

2. Window length smaller than FFT size.

See the Fig.1 of this paper. It uses a window h(m) that is less than the FFT transform size. In this case, the data at both ends of a frame are not weighted. Is it the same as padding zero at both ends? From the figure, it is not the case because M samples of input are used. If it is zero-padding, then we only have to input data samples with the same length with h(m). So how are data at ends processed?

What am I missing with these questions? Thank you!

For convenience, a snapshot of Fig.1 is attached here.  • FFT use the whole signal while STFT computes the FFT of the window. The time and frequency resolutions depend on the size of the window. Since the window size of STFT is less than the signal length, you will expect lower maximum frequency. Jun 22, 2022 at 12:29
• Is this question still of interest? Mar 26 at 10:22

When the window length is smaller, you'd make the size of the frame/windowed signal equal to the FFT size by padding with zeros.

The other case does not make sense to me (could be my limitation). Usually the FFT size is greater than the size of the frame/windowed signal, and the nearest power of two.

Steve Smith's page explains this pretty well.

You take your $$NM$$-length signal and split it into $$M$$ signals of length $$N$$, and do the FFT on that $$N$$-length signal.

The variables are:

\begin{align}M &: \mbox{the number of analysis windows}\\ N &: \mbox{the length of your FFT}\\ R &: \mbox{the hop size, how far between analysis windows you move} \end{align}

If $$N=R$$ then the signal is $$NM$$ long. If $$R \lt N$$ then the signal is less than $$NM$$ long.