To better understand how lyrics can we generated, we need to step back and understand how songs are formed. We take four popular artists (Michael Jackson, Amy Winehouse, Eminem, and Kanye West) and try to see what words they use frequently in their music. We start off first by taking each artist and concatenating each song to create a single string. We then do a series of transformations including all lowercase, remove numbers, remove common english words, remove punctuation, strip whitespaces and finally stem the file so that like words can be combined into one (love, lovely will both map to love).
For the first two of my faviriote artists, Michael Jackson the king of pop and Amy Winehouse my self proclaimed queen of pop. The prediction I had when looking at this two artists was that they generally used similar words with an approximate proportions. Later I hope to visualize the interactions between these two artists.
Other than seeing this nice visualization, the few major things I noticed is that 1. They both use the words Love and Just quite frequently. Another point we notice is that the word cloud of Michael Jackson is smaller than the one shown for Amy Winehouse. In the code used for these visualizations, I had taken the top 200 words for each artist and displayed scaled to how frequent the words were used. This implies that out of the top 200 words each artist uses, that Michael has a very skewed proportions. Lets take a look at Eminem and Kanye West, two of the best rappers of our generation.
The prominent thing we notice for the rapper is their obvious use of explicit languages. Another point is the large use of conjugate words in their lyrics. My guess for this might be that rap songs tend to have multiple ideas and themes in each verse and lines, that there may be a frequent use of conjugates to connect these ideas and lines. The most interesting point from these word clouds is the wide connecting between words in each genrea. This would be a very important concept to keep in mind when moving forward with the AL Lyricist project. While it might be tempting to combine Kanye West and Eminem or even Miceal Jackson and Amy Winehouse for a larger training data set, we need to make sure that they not only come from the same genera but that they use a similar set of frequent words.
This will hopefully be the start of a series of blog posts that will follow along the creation of a lyric generator that will imitate and become indistinguishable from lyrics we would expect from different artists. For our first and quick attempt into creating this AI, we use all the lyrics of Michael Jackson and try to attempt to get a small sample of lyrics that closely resemble Michaels' style.
Sample lyrics from first attempt:
my hearts down the fare
And when I want to get and way
Girl we'll save me say to be a con me
I naver warker me love me
Be was a call with you
Can't the from me brot your ploong a lie
ut it, beat it
Just beat it, beat it
Whone you know Ithings is
I neeld furtin' ow
It's stout you got awarid they you like the long
So buf it, be night
Just beat it, beat it, beat it, beat it
Just beat
to get ender
She sing, the way she story stanter hee
Dight in the faye
I can't tance, litin' me
And I won't take your live
And mane at underes
And I'll never sive
Asy her foo the wry sumertly
The size of the dataset was a 458598 characters string. With iterations of 50 context, the model trained for 15 epochs. The model had just a single layer with 256 units connected to our logits. We expect learning to occur but we are not aiming for high accuracy since because we are aiming for unique new songs and not just a repetition of learned songs. The characters were 1 shot encoded for a vector size of 92. There were a few unexpected characters in our dataset as the songs were scraped from MetroLyrics, characters such as '¡' and '#' have accidently leaked into the dataset. The accuracy and loss over the span of the learning stage are shown below:
Currently the dataset I am using for this network are the lyrics to 279 songs that were sung by Michael Jackson as well as those that list him as a producer. The songs were compiled into one file of about .43 MB. An observation we can see from the samples generated is that the dataset is not large enough. A shift from our network would be to compile a list of artists with similar styles so that the song generator can give full coherent sentences.
Initial code base used to build this is from Professor. John Cunningham who provided the building blocks in his Advanced Machine Learning course I took during the fall of 2017.