I'm doing test_split before the feature extraction. however, when I try to loop through any set, whether train or test, I get the following error (ValueError: too many values to unpack(expected 2))
for cls in os.listdir(path):
for sound in tqdm(os.listdir(os.path.join(path, cls))):
wav = librosa.load(os.path.join(os.path.join(path, cls, sound)), sr=16000)[0].astype(np.float32)
tmp_samples.append(wav)
tmp_labels.append(cls)
print(tmp_samples)
X_train, y_train , X_test , y_test = train_test_split( tmp_samples, tmp_labels , test_size=0.60,shuffle=True)
for x,y in X_test,y_test:
extract_features(x, y, model, plain_samples , plain_labels )
This is what is inside the X_train:
[array([ 0.09814453, 0.04959106, 0.04248047, ..., -0.08251953,
-0.07385254, -0.03076172], dtype=float32), array([ 0.06820679, 0.03372192, 0.00292969, ..., -0.19833374,
-0.18746948, -0.18157959], dtype=float32), array([-0.04940796, -0.04251099, -0.02798462, ..., -0.04455566,
-0.03005981, -0.01742554], dtype=float32), ....etc