Closed ashishpatel26 closed 5 years ago
What is S_full[:, idx].shape
?
I just realized that this piece of code seems to come from our gallery of example scripts: plot_vocal_separation.py
https://github.com/librosa/librosa/blob/master/docs/examples/plot_vocal_separation.py#L45
I installed librosa 0.6.3 from a fresh conda environment and was unable to reproduce the error. Here's my install
Darwin-18.6.0-x86_64-i386-64bit
Python 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56)
[Clang 4.0.1 (tags/RELEASE_401/final)]
NumPy 1.17.0
SciPy 1.3.0
librosa 0.6.3
So the situation is two-fold: (1) either the error stems from using an old version of numpy, which i doubt;
(2) or the error stems from a modification of the script which causes S_full[:,idx]
to be empty.
If i had to take a guess, i would expect that we're in situation (2), not (1).
Interestingly, just by looking at public repositories, i can see that the line
idx = slice(*librosa.time_to_frames([30, 35], sr=sr))
has been copy-pasted onto 30 different other scripts: https://github.com/search?p=1&q=idx+%3D+slice%28%2Alibrosa.time_to_frames%28%5B30%2C+35%5D%2C+sr%3Dsr%29%29&type=Code
TL;DR @ashishpatel26, perhaps you're running this code on an input signal that is less that 35 seconds long? In this case, make sure to adjust the [30, 35]
time range accordingly.
Without news from OP @ashishpatel26, i'm going to close this issue. Feel free to re-open if necessary. Again, there's a >99% chance that the script above fails because it is run on an input signal that is shorter than 35 seconds. The solution is to adjust the time range.
We have librosa version 0.6.3