Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to invert a log-STFT? #136

Open
turian opened this issue Sep 4, 2024 · 0 comments
Open

How to invert a log-STFT? #136

turian opened this issue Sep 4, 2024 · 0 comments

Comments

@turian
Copy link
Contributor

turian commented Sep 4, 2024

I am trying to invert a log STFT from nnAudio but the audio sounds strange and metallic and the NSDRs are much worse on the reconstruction.

This doesn't work:

    stft_layer = STFT(n_fft=n_fft, hop_length=hop_length, freq_scale='log', output_format='Complex', sr=sr)
    stft_output = stft_layer(waveform)

    istft_layer = iSTFT(n_fft=n_fft, hop_length=hop_length, freq_scale='log', sr=sr)
    inverted_waveform = istft_layer(stft_output, onesided=True, length=waveform.shape[-1])  # Set length

But if I remove freq_scale="log" it works just fine. Why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant