Orchestrate AI is a deep learning project which classifies music according to moods and generates music from given mood label.
Orchestrate AI has a web client and an android client. The web client is deployed in heroku and android client resides in this repository.
Python 2.7 because a dependency (python-midi) does not support python 3.
Run two setup scripts - setup.py and postsetup.py.
Run only postsetup.py in 'sudo' mode to install correct dependencies. If setup.py is runs in 'sudo' mode, then the dependencies are installed in global packages location instead of virutalenv.
Use virtualenvwrapper or virtualenv for better support.
- Setup Virtualenv
mkvirtualenv orchestrate_ai --python=$(which python)
- Install pip dependencies.
pip install -r requirements.txt
- Install youtube-dl
sudo apt update
sudo apt install youtube-dl
All the code for web client goes inside orchestrate_ai/webclient module.
To run dev server:
python runwebclient.py
For preparing data set run prepare_dataset.py script. It uses simplejson, urllib3 and YouTube API to download video list from YouTube Audio Library Channel. It then uses youtube-dl to download videos in audio format of m4a from the given list.
python prepare_dataset.py
Run trainer.py to train the given dataset. The dataset to be trained are placed in midis folder. It may take some time.
python trainer.py
Run predictor.py with file location as an argument.
python predictor.py ~/music/testingmidi.midi
Run lyrics_trainer.py to train the given dataset. The dataset to be trained are placed in lyrics folder. It may take some time.
python lyrics_trainer.py
Run lyrics_predictor.py.
Available options:
- -f: File location of lyrics
- -s: Lyrics string
- -h: Help
python lyrics_predictor.py -f ~/lyrics/song_lyrics.txt
python lyrics_predictor.py -s "Some song lyrics goes here."
python lyrics_predictor.py -h