madebyollin/acapellabot

python data.py . gives IndexError: too many indices for array

Closed this issue · 4 comments

Loading Data 
	 [Instrumental] Created spectrogram for 01 The Ringer.mp3 in key 1 with shape (769, 19406) 
	 Created 0 mashups for key 0 with 0 total slices so far 
	 Created 0 mashups for key 1 with 0 total slices so far 
	 Created 0 mashups for key 2 with 0 total slices so far 
	 Created 0 mashups for key 3 with 0 total slices so far 
	 Created 0 mashups for key 4 with 0 total slices so far 
	 Created 0 mashups for key 5 with 0 total slices so far 
	 Created 0 mashups for key 6 with 0 total slices so far 
	 Created 0 mashups for key 7 with 0 total slices so far 
	 Created 0 mashups for key 8 with 0 total slices so far 
	 Created 0 mashups for key 9 with 0 total slices so far 
	 Created 0 mashups for key 10 with 0 total slices so far 
	 Created 0 mashups for key 11 with 0 total slices so far 
Traceback (most recent call last):
  File "data.py", line 120, in <module>
    d = Data(sys.argv[1], 1536)
  File "data.py", line 50, in __init__
    self.load()
  File "data.py", line 108, in load
    self.x = np.array(self.x)[:, :, :, np.newaxis]
IndexError: too many indices for array

It looks like you're trying to generate training data? You'll need both instrumentals and acapellas to generate training data (from the output above, it looks like there's only an instrumental). Try adding a file named 1 acapella.mp3 containing an acapella.

Thank you for response. I have more questions:

  • Does the acapella has to be same singer singing same song or can be any singer singing any song (in acapella)?
  • Is it possible for you to share the training data you made for this task?

Btw vocal separation is a great idea.

Does the acapella has to be same singer singing same song or can be any singer singing any song (in acapella)?

Anything should work (none of my training data were matched). You just need the model to learn vocal-like shapes and instrument-like shapes.

Is it possible for you to share the training data you made for this task?

There's a nice dataset here you could try. My training data is (for the most part) from my personal music library and sites like http://acapellas.eu/ or https://www.acapellas4u.co.uk/, so I'm not sure I can legally host it anywhere 😓if you can collect a dataset that is specific to the genre of music you're working with, that should improve things further. The network is fairly small, so you shouldn't need a particularly large dataset.

Okay. Thanks for the information. 🙂