Answers.Body: <p>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 &quot;probability that this audio is a Queen song&quot; as a proxy for similarity.</p>
  <blockquote>
  <p>First of all, is 300 songs even enough?</p>
  </blockquote>
  <p>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.</p>
  <p>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.</p>
  <p>From your comments:</p>
  <blockquote>
  <p>similar in voice, like Gnarles Barkley is more similar to Alicia Keys than System of a Down</p>
  </blockquote>
  <p>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 &quot;more similar&quot; 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.</p>
  <p>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 <em>something</em> 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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-04T12:42:54.427Z
Answers.LastActivityDate: 2021-04-04T12:42:54.427Z
Answers.UserDisplayName: Neil Slater
Body: <p>I've asked this question before (@ Reddit) and people suggested CNNs on a mel spectrogram more than anything else. This is great.</p>
  <p>But I'm sort of stuck at: label some music data as &quot;queen&quot; and &quot;not queen&quot; 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.</p>
  <p>First of all, is 300 songs even enough?</p>
  <p>I only have a basic understanding of what I'm doing. I need some help</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-04-03T08:53:47.733Z
Comments.Text: 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?
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-04-03T22:11:33.297Z
Comments.Text: similar in voice, like Gnarles Barkley is more similar to Alicia Keys than System of a Down
Comments.UserDisplayName: Mike Johnson Jr
Tags: <convolutional-neural-networks><audio-processing>
Title: I want to determine how similar a given song is to Queen's songs. Am I headed in the right direction?
UserDisplayName: Mike Johnson Jr
ThreadText: # I want to determine how similar a given song is to Queen's songs. Am I headed in the right direction?
  
  (Asked by: username_0 on 2021-04-03)
  
  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
  
  **Tags:** convolutional-neural-networks, audio-processing
  
  > **Comments:**
  > **username_1**: 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?  
  > **username_0**: similar in voice, like Gnarles Barkley is more similar to Alicia Keys than System of a Down  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-04-04. Score: 2
  
  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.
  
  
  ---
  
  