Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I had an error on training in trainModel.py #12

Open
wlsskgus0732 opened this issue Aug 18, 2021 · 1 comment
Open

I had an error on training in trainModel.py #12

wlsskgus0732 opened this issue Aug 18, 2021 · 1 comment

Comments

@wlsskgus0732
Copy link

I had an error on this line
train_x, test_x, train_y, test_y = train_test_split(features, labels, test_size=0.3, random_state=0)

they said
ValueError: With n_samples=0, test_size=0.3 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters.

How can I solve this?

@sultanoid
Copy link

Find this line of code:

mel = np.array(librosa.feature.melspectrogram(X, sr=sample_rate).T)

and replace with this line:

mel = np.array(librosa.feature.melspectrogram(y=X, sr=sample_rate).T)

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants