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.

Incorrect documentation for librosa.core.spectrum.istft() function?

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lostanlencommented, Aug 7, 2018

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.

1reaction
r9y9commented, Jun 9, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

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