GithubHelp home page GithubHelp logo

jaedukseo / autosynch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swaglyrics/autosynch

0.0 1.0 0.0 260.19 MB

Automated lyrics-to-audio alignment using syllabic nuclei detection. Developed during Google Summer of Code 2019.

Home Page: https://swaglyrics.dev/autosynch

License: Other

Python 99.56% Shell 0.44%

autosynch's Introduction

autosynch

Build Status codecov

Check out my blog on my progress and process throughout GSoC 2019!

about

Given an audio file of some recognizable song, autosynch will try to align its lyrics to their temporal location in the song. The song lyrics must be available on Genius.

This project is still in its early stages and is inaccurate in many cases. Optimization is a work in progress, but feel free to try it out, modify it, or contribute!

Developed during Google Summer of Code 2019 with CCExtractor.

installation

To install, do the following:

git clone
cd autosynch
pip install -r requirements.txt

Note: autosynch is supported only on Python 3.6+.

dependencies

Using autosynch requires a trained model for vocal isolation as well as PortAudio. For mp3 support, SoX is required. On MacOS/Linux, get everything by executing:

chmod a+x setup.sh
./setup.sh

download model

If you would like to download the weights manually or get a different version, check here:

  • DOI for weights trained on MedleyDB V1
  • DOI for weights trained on MedleyDB V2

Weights must be placed into autosynch/mad_twinnet/outputs/states.

install portaudio

On Mac:

brew install portaudio

On Linux:

sudo apt-get update
sudo apt-get install portaudio19-dev

install sox

Note: Installing SoX is optional and only required for processing mp3 files.

On Mac:

brew install ffmpeg

On Linux:

sudo apt install ffmpeg

usage

To play a song with its lyrics displayed at its calculated position:

python autosynch/playback.py [audio_file.wav] [artist] [song_title]

It will take a few minutes to perform the alignment process. To save the alignment data to eliminate processing time in future plays of the same audio, add the flag -s SAVE_DIR, where SAVE_DIR is the directory you want to save the alignment data.

If you have already generated and saved an alignment data file:

python autosynch/playback.py [audio_file.wav] -f [align_file.yml]

If you would like to process an mp3 file, see this section. Running with an mp3 will automatically generate a wav file in the same directory.

Note: If you did not use setup.sh, first make sure you set your Python environment correctly with export PYTHONPATH=$PYTHONPATH:./ from the outer autosynch directory.

demos

Bruno Mars - Finesse

Finesse demo

(https://www.youtube.com/watch?v=csBDM14ssts)

The last chorus lags behind a bit, but for the most part sections and lines are nicely aligned.

Fun. - We Are Young

We Are Young demo

(https://www.youtube.com/watch?v=Z-yTGKd3ji8)

The instrumental at the beginning throws off the first verse, but everything catches up in by line 4.

references

autosynch's People

Contributors

chriswang030 avatar dependabot-preview[bot] avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.