Hi @Mole_m7b5, thanks for posting the question. The number of frames is hard coded in torch.stft
  int64_t n_frames = 1 + (len - n_fft) / hop_length;
  // time2col
  input = input.as_strided(
    {batch, n_frames, n_fft},
    {input.stride(0), hop_length * input.stride(1), input.stride(1)}
  );
  if (window_.defined()) {
    input = input.mul(window_);
  }

If you increase the value of n_fft, the number of frames will be decreased.