{"id":13501814,"url":"https://github.com/robbiebarrat/rapping-neural-network","last_synced_at":"2025-05-16T14:07:30.874Z","repository":{"id":44426761,"uuid":"72793197","full_name":"robbiebarrat/rapping-neural-network","owner":"robbiebarrat","description":"Rap song writing recurrent neural network trained on Kanye West's entire discography","archived":false,"fork":false,"pushed_at":"2023-07-23T21:35:45.000Z","size":18882,"stargazers_count":1051,"open_issues_count":15,"forks_count":166,"subscribers_count":63,"default_branch":"master","last_synced_at":"2025-04-19T16:30:04.975Z","etag":null,"topics":["generative-art","learning","lyrics","machine","mp3","neural-network","rap","rap-songs","rhymes","songs","songwriting"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robbiebarrat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-11-03T22:39:49.000Z","updated_at":"2025-03-03T17:18:12.000Z","dependencies_parsed_at":"2023-01-31T22:45:28.927Z","dependency_job_id":"776e1afd-5529-4536-b99d-2535b8670338","html_url":"https://github.com/robbiebarrat/rapping-neural-network","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbiebarrat%2Frapping-neural-network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbiebarrat%2Frapping-neural-network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbiebarrat%2Frapping-neural-network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbiebarrat%2Frapping-neural-network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robbiebarrat","download_url":"https://codeload.github.com/robbiebarrat/rapping-neural-network/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generative-art","learning","lyrics","machine","mp3","neural-network","rap","rap-songs","rhymes","songs","songwriting"],"created_at":"2024-07-31T22:01:51.560Z","updated_at":"2025-05-16T14:07:30.854Z","avatar_url":"https://github.com/robbiebarrat.png","language":"Python","funding_links":[],"categories":["Python","Applications","Projects"],"sub_categories":["Music"],"readme":"# Rapping-neural-network\nThis is a generative art project I made for my high school's programming club - which ~I'm the president/founder of~ I was the president/founder of until I graduated.\n\nIt's a neural network that has been trained on Kanye West's discography, and can use any lyrics you feed it and write a new song *word by word* that rhymes and has a flow (to an extent).\n\nQuartz did a really nice profile on me and the program here; https://qz.com/920091/a-west-virginia-teen-taught-himself-how-to-build-a-rapping-ai-using-kanye-west-lyrics/\n\n## UPDATE: Here's a Google Colab notebook that runs the project: https://goo.gl/GHSWzZ\n\n# Let's hear something it made\nOkay... Here's a song it wrote *word by word* using kanye's discography - excuse the vulgarities, the neural network wrote it and not me.\nhttps://soundcloud.com/rapping_neural_network/networks-with-attitude\n\n# Lyrics to above song\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand\u003c/summary\u003e\n\nBust a playa with the kids I never had\n\nAll his time, all he had, all he had, all he had\n\nMost you rappers don't even stop to get the most press kit\n\nPlayas is jealous cause we got the whole city lit\n\nBut without it I'd be worried if they playing that bullshit\n\nYou wanna complain about the nights even wilder\n\nI swear to God I hope you have got to hear\n\nI'll touch every curve of your favorite author\n\nNo more wasting time, you can't roam without Caesar\n\nBack when Gucci was the best summer ever\n\nBefore Cam got the hundred with the peer pressure\n\nShe walking around looking like Herve Leger\n\nSo next time I'm in between but way more fresher\n\nAnd they say you never know, never never NEVER\n\n...\n\nYou the number one I'mma beat my brother\n\nAnd I know a sign when I heard it's the magic hour\n\nGet Olga Kurylenko, tell her to do better\n\nThat know we get them hammers, go on, call the lawyer\n\n\nBut still supported me when I get richer\n\nThis my first pair of shoes, I made the Bulls play better\n\nOr use my arrogance as a wholesaler\n\nPrince Williams ain't do it can't be your damn liar\n\nYou say I dress white, but my broad way thicker\n\nIf I be Don C, we got that, that thing clear\n\nI dropped out of your body like a wrestler\n\nI can't believe I'm back to a cold killer\n\nLady Eloise I need another lover\n\nHe loved Jesus when he off the power\n\nSo I pour the potion, so we gone dress whiter\n\nOld folks talking bout Linda, from last September\n\nMight spend 50 racks on my life like a fucking loser\n\n...\n\nHe don't even stop to get this difficult\n\nShe told me that I stayed at home with my own vault\n\nShe's so precious with the space for the safe belt\n\nGirl he had the strangest feeling lately\n\nFuck you playa I know it's especially\n\nBut let some black people to think logically\n\nFire Marshall said I could give you this feeling\n\nAnd wrote hooks about slaves that the youth is missing\n\nI know this part right here, history in the ring\n\nWell I guess she was messin wit me when I'm cumming\n\nI'm way better than some head on a chain gang\n\nOn a scale of this, and now you doing your thang\n\nY'all I know you're living your life so exciting\n\nStarted a little blog just to say nothing\n\nI'mma need a fix, girl you was celebrating\n\nMayonnaise colored Benz I get my engine revving\n\nAnd my chick in that old lady on Boomerang\n\nWifey gonna kill me, I do a gangbang\n\nI put an angel in your life so exciting\n\nRight when I do it right if you was celebrating\n\nI was in Benzes, I was still at Burger King\n\nIt feel like this but playas don't know what you're drinking\n\nReally Doe told you come on homie they wilding\n\nI swear this right here, feel free to sing along\n\nShoulda known that was gonna come as it's good I'm young\n\n...\n\nThese playas read the pimp manual, but I just want your girl you was clubbin'\n\nFirst I spin around and vomit, then I made it from the day you just pretendin'\n\nBut I bet you they respect the name Kanye from the heart, y'all all frontin'\n\nWe in the same thing like a fat trainer takin a bite or somethin\n\nAbbey Lee too, I'm a jerk, you need that happy beginnin', middle and endin'\n\nThat mean I forgot better shit than you ever heard about all this name callin'\n\nCause I can never be as laid back as this flow end, I'mma let Mos begin\n\nAnd I bet you they respect the name Kanye from the heart, y'all all frontin'\n\n...\n\nMy mama used to stay recession free\n\nAll my friends says implants is a beat from Ye\n\nI want is what I do, act more stupidly\n\nWith no response make you wait longer than A.C.\n\nLoud as a shorty I looked up to this degree\n\nYoung Walt Disney, I'ma tell you once ting\n\nStraight to jail, yo, in a Bentley shining\n\nWhy you trying to make it just ring and ring\n\nNow why would I listen to T-Pain and sing\n\nEverything I throw them all laughing\n\nSo glad I ain't gotta borrow nothing\n\nSo I promised her everything\n\nI've been waiting on this rocket, Yao Ming\n\nI don't drink the drama that your dude bring\n\nKanye West is the making of a romantic\n\nPlay strings for the World's game, this is tragic\n\n...and this is the making of a romantic\n\nI done wore designers I won't get specific\n\nThe layers to my roots, I'm like a paraplegic\n\nCome on, let's take a lot more than the music\n\nI mean, after all the way we was magic\n\n...\n\n\u003c/details\u003e\n\n## Setup\n\nInstall (with python 2.x)\n\n    pip install -U -r requirements.txt \n\n## Usage\n\n### See [documented_model.py](https://raw.githubusercontent.com/robbiebarrat/rapping-neural-network/master/documented_model.py) for notes as python comments.\n\n### Data preperation\n**If you'd like to use Kanye's lyrics - skip this section**\n`Lyrics.txt` comes with Kanye's entire discography in it. You can either use this, or fill it with other lyrics.\n\nGuide to using your own lyrics with `lyrics.txt`\n* Avoid including things like \"[bridge]\" or \"[intro]\" \n\n* Seperate each line by a newline\n\n* Avoid non alphanumeric characters (besides basic punctuation)\n\n* You don't have to retype everything - just copy and paste from some lyrics website\n\n### Training\n**Skip this part if you are using the default kanye lines**\n\n* In `model.py`, change the variable `artist` to the name of the new artist you've used in `lyrics.txt`\n\n* In `model.py`, change the variable `train_mode` to `True`\n\n* Run the program with `python model.py`, and allow training to finish.\n\n### Generating raps\n\n* In `model.py`, if you've trained a new network, the variable `train_mode` will be `True`, set this back to `False`\n\n* Run the program with `python model.py`\n\n* The rap will be written to the output of your terminal, and also to a file called `neural_rap.txt`\n\n### Performing raps\n\n* speech.py will \"rap\" the generated songs with a text to speech over a generic rap beat (`beat.mp3`), just run `python speech.py`\n\n## How it works\n\nAlright, so basically a markov chain will look at the lyrics you entered and generate new lines. Then, it feeds this to a recurrent neural net that will generate a sequence of tuples in the format of \n\n    (desired rhyme, desired count of syllables)\n\nThe program will then sift through the lines the markov chain generated, and match the lines to their corresponding tuples. The result is the rap.\n\n# Future goals:\n\n1. Use lyrebird.ai to have it rap in Kanye's voice... I'll probably have to hire a Kanye voice impersonator to supply me with 5 minutes of audio to train the net with though... Either that or jailbreak an old iPod and use it to do text to speech with Siri's voice.\n\n\n2. Bring back the seperate 'verses' and appropriate pauses that the first version had.\n\n\n3. Generative rap beats that it can rap over.\n\n\n\nOnce I get the lyrebird.ai thing working where it can rap and imitate someone's voice, I really want to do some type of 'album' where there's a separate track on it for each really popular dead rapper (The 90's had some really good ones, Notorious B.I.G., Big L, etc.) - where each track would have the network rapping with lyrics / flow in the style of the said rapper, and imitating their voice with lyrebird's network (admit it, the current text to speech I have is pretty trash). Kind of like an AI resurrection of dead rappers...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbiebarrat%2Frapping-neural-network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobbiebarrat%2Frapping-neural-network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbiebarrat%2Frapping-neural-network/lists"}