musicGenerationPython allows you to find ringtone on spotify, then give that song to tensorflow-magenta
for it to try to continue your ringtone
python3 main.py name\ song\ from\ spotify and\ another\ one
Result .mid
file is in outputMusicGeneration/
directory.
tensorflow-magenta
works best with classical music, because of conversion to .mid
, I highly do not recommend using any music with human speech in it
Algorithm works that way:
- Searches for your query song on spotify(Because spotify has better search than youtube does)
- Searches that song on youtube
- Downloads
.mp3
from youtube (Download speeds are very slow because of I guess google somehow blocks network traffic fromyoutube_dl
) - Converts
.mp3
to.wav
--- higher quality == better conversion to.mid
- Converts
.wav
to.mid
(tensorflow-magenta
works only with.mid
) - Loads pretrained model for
magenta
- Continues all the
.mid
files and saves them tooutputMusicGeneration/
- Deletes temporary files
- Make https://github.com/kichiki/WaoN as
waon
in the same folder asmain.py
file spotipy
youtude-search
youtube-dl
magenta
- Use jupyter notebook instead of
.py
file - Improve codestyle a lot --- had no time to write a decent code
- Get better pretrained model --- had no time to search for the good one, got the simplest possible
basic_rnn.mag
- Change
youtube-dl
to something better to download videos faster than60kb/s