A spectrogram inversion package for PyTorch

Hello folks~

I made an PyTorch package that included some classic spectrogram inversion algorithms (like Griffin-Lim) to recover phase information given only the magnitude response of audio. I would like to invite everyone to take a look and use it.

You can find its repository here: https://github.com/yoyololicon/spectrogram-inversion
The docs: https://spectrogram-inversion.readthedocs.io/.
Any issues and contributions are wellcome.

Cheers :slightly_smiling_face:


Thanks for sharing your code! :slight_smile:
May I ask the naive question, when this would be used?
Could we e.g. create a spectrum using a GAN and use your inversion algos to create the waveform?

Exactly, as long as the spectrum follow the regular fourier representation.
We assume the target magnitude spectrum that used in training is obtained using torch.stft.

Thanks for sharing your code indeed! :slight_smile: Are there additions you’d also like to see in the implementation available in the master branch of torchaudio?

1 Like