An automatic lyrics generator using Markov chains
The generator (built from Markov chains) consists of three MC models, namely Intro
, Body
, and Outro
generators.
The models learn from their corresponding parts of songs, and generate only the part of lyrics they are assigned to.
Parts of the lyrics from each model are combined at the end to make a complete lyrics.
- Deepcut (required Keras with Tensorflow backend)
- Numpy
- BeautifulSoup4
song_downloader.py
- A script for downloading (scraping) lyrics from Siamzone.compreprocessor.py
- A script for preprocessing the downloaded lyricssong_generator.py
- A lyrics generator.
Note:
- Make sure to run the above files in order. (in case of starting from scratch)
- Each file requires path and parameter set up before start running. (in-file setup, no command line argument parsing)
- Follow the description at each file's header on how to setup and technical details.
Pre-trained model is a json file containing a dictionary that serves as state transition table for Chain
class in song_generator.py
.
The model is located in \pretrained
.
Always set use_pretrained
variable in song_generator.py
True
if you want to use this option.