I am working on the GTZAN dataset posted on Kaggle using pytorch and librosa.
My idea was to create a list of all the paths to the files and then looping the files through librosa.load to read them. (Please excuse my horrendously written code, also, please give me suggestions on how to improve them, Thanks)
for n,path in enumerate(file_list):
x=infoextract(path)
print(n+1,x)
def infoextract (file):
signal, sr = librosa.load(file)
mfcc = librosa.feature.mfcc(y=signal, sr=sr)
mfcc = torch.from_numpy(mfcc.T)
return mfcc
The nobackend error occurs everytime when the process reaches to the 554th file.
-
I have read suggestions about using scipy.io instead of librosa.read…. thing is the signal from scipy.io is not compatible with librosa.feature.mfcc
-
I tried removing the file, even the entire folder containing the 554th file, but the error still occurred, so the potential of file corruption is eliminated
-
I tried shortening the file sample range from 30 sec to 5 sec, nothing happened.
Chun Kit Bruce Lam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.