2
$\begingroup$

I've asked this question before (@ Reddit) and people suggested CNNs on a mel spectrogram more than anything else. This is great.

But I'm sort of stuck at: label some music data as "queen" and "not queen" and have this be the training set. Like, download 300 songs, 70 queen (that's all they have) and 230 not queen, create their mel spectrograms using some python package that can do that.

First of all, is 300 songs even enough?

I only have a basic understanding of what I'm doing. I need some help

$\endgroup$
2
  • 1
    $\begingroup$ Welcome to AI Stack Exchange. Could you expand on what you mean by "similar"? There are lots of ways (dimenisons) in which two songs can be similar. Once trained, how do you intend to use your neural network? $\endgroup$ Apr 3, 2021 at 8:53
  • $\begingroup$ similar in voice, like Gnarles Barkley is more similar to Alicia Keys than System of a Down $\endgroup$ Apr 3, 2021 at 22:11

1 Answer 1

2
$\begingroup$

You are heading in the right direction to make an audio-based classifier. This is not quite the same as providing a similarity metric between two pieces of audio, but it may do as a first attempt. You could use the "probability that this audio is a Queen song" as a proxy for similarity.

First of all, is 300 songs even enough?

Nowhere near enough to train a classifier from scratch. In that case you might be aiming for 10,000 samples or even up to a million, depending on how sophisticated you want your classifier to be.

However, you don't necessrily need to find that many training examples. Instead, if you can find a pre-trained audio classifier for music that is compatible with the libraries you are working with, and use transfer learning, you may get decent results. This works by replacing the last few layers of a neural nework trained with your own ones and training the network on your data only modifying those new changed layers.

From your comments:

similar in voice, like Gnarles Barkley is more similar to Alicia Keys than System of a Down

The tone of the vocals is one part of many things that can vary between music recordings. A classifier with only a few examples to work from will not be able to isolate just the elements you are interested in. Also, without examples that are explicitly labelled in a way that "more similar" is meaningful in the way that you want, you will not have control over whether the neural network identifies Brian May's guitar, or 1970s studio equipment as the most easy to identify element compared to Freddie Mercury's vocals.

These things may limit the usefulness or accuracy of your first attempt, but I would not suggest you consider them immediately. You basic idea should produce something that has an interesting behaviour when given different inputs. Just be realistic that you will not get state-of-the-art results on your first attempts at the project.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .