Incorrect documentation for librosa.core.spectrum.istft() function?
See original GitHub issueI’m not sure if this is an actual “issue” or just an indication of my lack of understanding, but it seems like the documentation for librosa.core.spectrum.istft()
may be incorrect.
The documentation in the code indicates that the function operates by minimizing mean squared error as described in Griffin & Lim. But I don’t think that’s what is going on in this function.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
librosa.istft — librosa 0.10.0.dev0 documentation
Converts a complex-valued spectrogram stft_matrix to time-series y by minimizing the mean squared error between stft_matrix and STFT of y as described in...
Read more >Source code for librosa.core.spectrum
This function returns a complex-valued matrix D such that - ``np.abs(D[..., f, ... [docs]@cache(level=30) def istft( stft_matrix, *, hop_length=None, ...
Read more >Source code for librosa.core.spectrum
This function returns a complex-valued matrix D such that ... [docs]@cache(level=30) def istft( stft_matrix: np.ndarray, ... S = librosa.core.spectrum.
Read more >librosa.stft — librosa 0.10.0.dev0 documentation
The STFT represents a signal in the time-frequency domain by computing discrete Fourier transforms (DFT) over short overlapping windows. This function returns a ......
Read more >librosa.griffinlim — librosa 0.10.0.dev0 documentation
windowstring, tuple, number, function, or np.ndarray [shape=(n_fft,)]. A window specification as supported by stft or istft. centerboolean.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What is indeed puzzling in the documentation is that it cites the Griffin-Lim paper, which is mostly reknowned today as a phase retrieval paper, with the algorithm in Figure 1 (“the Griffin-Lim algorithm”). Yet,
librosa.core.spectrum.istft
only uses the elements of the paper up to Section 2 ("reconstruction from MSTFT). It might be good to reference Section 2 specifically.If you tag this issue as 0.6.3 I can write a spiel about that in the docs.
Reading Griffin & Lim’s paper (PDF link) again, I think it’s correct. See section 2 of their paper (eq. (4) ~ (6)). Any suggestions for wording are welcome though.
MSE minimization is not about phase retrieval, which might be confusing since Grifin & lim algorithm often reffered as a phase reconstruction algorithm.