question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reverse MelScale, Griffin-Lim transformation

See original GitHub issue

🚀 Feature

I have implemented PyTorch versions of librosa’s mel_to_stft and griffinlim, which I believe would be useful for any generation task using mel-spectrograms. You can see it as a part of my Melnet implementation here: https://github.com/jaeyeun97/MelNet/blob/master/audio.py. While it currently does not conform to the standards of this repo with a little touch here and there I think it would be a good addition.

Motivation

  1. librosa has mel_to_stft, which solves for a spectrogram of linear frequency scale from a Mel scale spectrogram. Having a pure PyTorch implementation would remove the need of a librosa dependency and add support for GPU processing (which speeds up the processes significantly)

  2. Similarly, Griffin-Lim algorithm provides an approximation for phase in order to provide a better spectrogram inversion, and since this project provides an implementation for istft I thought I would use it to port the griffinlim function from librosa.

Pitch

I would like to add the code for Griffin-Lim and mel-to-linear scaling I referenced above to this repository.

I don’t know why this hasn’t been done before–was there any license issue, etc. regarding porting the code? Otherwise, I think this would be a relatively a painless merge into the repository.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vincentqbcommented, Feb 28, 2020

Thanks again for working on this @jaeyeun97! #448 merged the second request made in this issue.

0reactions
vincentqbcommented, Dec 13, 2019

@vincentqb Would you like these as separate pull requests or as one?

I usually separate, but please do what’s convenient for you for this 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

torchaudio.transforms - PyTorch
Create MelSpectrogram for a raw audio signal. GriffinLim. Compute waveform from a linear scale magnitude spectrogram using the Griffin-Lim transformation.
Read more >
How To Convert Log-Mel features back to audio waveform ...
This will be a short post on how to convert frequency domain log-Mel features back to time-domain waveform, basically inverting or reversing ......
Read more >
torchaudio.transforms — Torchaudio 0.7.0 documentation
Compute waveform from a linear scale magnitude spectrogram using the Griffin-Lim transformation. Implementation ported from librosa 1, 2, 3. Parameters.
Read more >
How can I invert a MelSpectrogram with torchaudio and get an ...
waveform, sample_rate = torchaudio.load('test.wav') mel_specgram = transforms. ... Then pass it to GriffinLim just like you already did.
Read more >
Extracting Mel Spectrograms with Pytorch and Torchaudio
Learn how to extract Mel Spectrograms and resampling audio with torchaudio. I also review the most common torchaudio transforms and explain ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found