I really appreciate what Pytorch team is doing and putting together STFT and related DSP tools in the framework is great !
so I would like to point this out in case it may help the further developments (or not, I might be wrong in what I underline)
the fact that n_fft affects the output number of frames is maybe “undesired”
how I learned, the signal slicing is defined by the window size and the hop size (and an optional center argument)
using n_fft>window_size is for increasing the frequency resolution by taking each signal slice and zero-padding it before computing its own fft
maybe there is something I’m missing but I was actually confused because of this …
issue solved for n_fft = win_size though : )