Here id my code . when I append into the array the array remain empty . Please help me where is the mistake. Or tell me some other way also to do this
A = []
# load more files with librosa
pathAudio = "drive/My Drive/dataset/noise/"
files = librosa.util.find_files(pathAudio, ext=['wav'])
files = np.asarray(files)
for y in files: data, sr = librosa.load(y)ps = librosa.feature.melspectrogram(y= data, sr=sr) if ps.shape != (128, 128): continueA.append((ps, y.files))
I checked the ps.shape
the output was (128,427). I think it has to save in that array
I also checked y.files
the output was *** AttributeError: 'numpy.str_' object has no attribute 'files'