audio icon indicating copy to clipboard operation
audio copied to clipboard

Ability to provide initial phase to Griffin-Lim

Open aaron-dees opened this issue 1 year ago • 0 comments

🚀 The feature

Ability to provide initial phase to griffin-lim, for phase reconstruction.

Motivation, pitch

pytorchaudio has a Griffin-Lim implementation to reconstruct audio from spectrogram magnitudes. Here phase is reconstructed entirely within torch's griffin lim implementation.

https://pytorch.org/audio/main/generated/torchaudio.transforms.GriffinLim.html

In tasks such as source separation, often the solution converges much more quickly/becomes better when using the mixture phase for the estimation of the source audio output. So it would be cool if another parameter could be added to the function allowing you to optionally pass in an initial guess of the phase.

This functionality exists in librosa's implementation of Griffin Lim, where if the function parameter 'init' is passed None, the phase is initialized from input spectrogram (which must now phase).

https://librosa.org/doc/latest/generated/librosa.griffinlim.html

Alternatives

No response

Additional context

No response

aaron-dees avatar Aug 27 '24 10:08 aaron-dees