In the default setup nn.RNN (as well as e.g. nn.LSTM) expect an input in the shape [seq_len, batch_size, features].
I assume you are working with 128 frequencies and a variable sequence length in the last dimension.
If that’s the case, you could remove dim1, which seems to be an unnecessary channel dimension via input = input.squeeze(1) and permute the inputs afterwards via:
input = input.permute(1, 0, 2)

to get the desired shape of [seq_len, batch_size, features].
You could also specify batch_first=True in the RNN, which would then expect the input in the shape [batch_size, seq_len, features].