Lyrics Generator

In [1]:
from song_generator import song_generator

The song generator downloads the lyrics for the artist, caches them, and initializes the Markov Chain by loading the lyrics. The download may take a few minutes.

In [2]:
sheeran = song_generator('Ed Sheeran')
Downloading albums...
Download finished.
Loading lyrics to generator...
Loading complete.
In [3]:
new_sheeran_hit = sheeran.make_song()
In [4]:
new_sheeran_hit.title
Out[4]:
'Photograph Felix Jaehn Remix Ft'
In [5]:
print(new_sheeran_hit.lyrics)
Night and we'll live forever now




Now somehow pre chorus so am i haven't
Slept for the moustache i hit back when
The pen hurts me i'm still the same
Way i know chorus 1 show me what

It's 30 degrees thursday you work late you
Was with a melody hennesey shots and glocks
All these things i've done i don't need
You at all love will your mouth read

Now somehow pre chorus so am i haven't
Slept for the moustache i hit back when
The pen hurts me i'm still the same
Way i know chorus 1 show me what

Fighting for his place keep your body oh—i—oh—i—oh—i—oh—i
I'm in love just on our own we
Are filming this for a better life this
Time god knows i'm singing hook ed sheeran

Now somehow pre chorus so am i haven't
Slept for the moustache i hit back when
The pen hurts me i'm still the same
Way i know chorus 1 show me what

When loading a generator for the artist again, even in a later session, it loads from the cache, so it goes way faster. (No download is necessary.)

In [6]:
    another_sheeran = song_generator('Ed Sheeran')
  
Loading lyrics to generator...
Loading complete.
In [7]:
mars = song_generator('Bruno Mars')
Downloading albums...
Download finished.
Loading lyrics to generator...
Loading complete.

Passing save=True to make_song or make_album saves to a new-lyrics folder in the project directory.

In [8]:
new_mars_album = mars.make_album(save=True)
In [9]:
new_mars_album.title
Out[9]:
'If You Dont Understand'
In [11]:
[song.title for song in new_mars_album.songs]
Out[11]:
['Dont Give Up', 'On Me', 'Turn Around', 'Remix Ft Gucci']
In [10]:
print(new_mars_album.songs[2].lyrics)
Us faded so gone so wrong in my
Head i'm losing my head the voices the
Voices the voices in my head i'm losing
My way but i know you're somewhere out

It might be on standby sendin' me straight
To voicemail suga what the hell oh you
Want it now pre chorus all you young
Wild girls you'll be banging on my chest

Goodbye goodbye verse 2 some things we do
Somewhere in brooklyn verse 2 i get lost
Under these lights i get dressed i put
You on another but what you got a

It might be on standby sendin' me straight
To voicemail suga what the hell oh you
Want it now pre chorus all you young
Wild girls you'll be banging on my chest

Think what happened to the moon chorus still
Trying to get up on yourself i loved
You loved to dance even if my father
Didn't tell me baby 'cause i can't get

It might be on standby sendin' me straight
To voicemail suga what the hell oh you
Want it now pre chorus all you young
Wild girls you'll be banging on my chest