madebyollin / acapellabot

Acapella Extraction with a ConvNet
http://madebyoll.in/posts/cnn_acapella_extraction/
205 stars 44 forks source link

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

Closed RahulBhalley closed 5 years ago

RahulBhalley commented 5 years ago
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
madebyollin commented 5 years ago

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.

RahulBhalley commented 5 years ago

Thank you for response. I have more questions:

Btw vocal separation is a great idea.

madebyollin commented 5 years ago

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.

RahulBhalley commented 5 years ago

Okay. Thanks for the information. 🙂