Giter VIP home page Giter VIP logo

zac2022-lyric-alignment's Introduction

Solution for Zalo AI Challenge 2022 - Lyrics Alignment

Requirements

pip install -r requirements.txt

Overview

  1. Using Demucs to extract the music and lyrics in the original audio.
  2. Resampling original audio to 16K audio.
  3. Creating new vocab dictionary for Wav2Vec2.
  4. Selecting segments from labels randomly and merge them to create new pair of audio/lyric.
  5. Fine-tuning Wav2Vec2 model with original CTC loss with all training data with the new vocab dictionary.
  6. Using forced-alignment (dynamic programming) to find the best alignment path between audio and lyric.
  7. Merging character durations to obtain words segment index from the audio.

Reproduce

Prepare Dataset

Download data here and prepare a dataset in the following format:

|- data/
|   |- public_test/
|       |- lyrics/
|       |- new_labels_json/
|       |- songs/
|   |- train/
|       |- labels/
|       |- songs/

Training

sh reproduce.sh

you can also download, extract our checkpoints here and will obtain the following format:

|- checkpoints/
|   |- dragonSwing/
|       |- wav2vec2-base-vietnamese/
|           |- checkpoint-5500/
|               |- pytorch_model.bin

Make A Submission

python submission.py submission --saved_path ./result
zip -r submit.zip result/*.json

zac2022-lyric-alignment's People

Contributors

dathudeptrai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zac2022-lyric-alignment's Issues

Size mismatch when copying a param from checkpoint

Xin chào team Telegram, mình chạy submission thì xuất hiện lỗi này

Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Wav2Vec2ForCTCV2: size mismatch for lm_head.weight: copying a param with shape torch.Size([109, 768]) from checkpoint, the shape in current model is torch.Size([98, 768]).
size mismatch for lm_head.bias: copying a param with shape torch.Size([109]) from checkpoint, the shape in current model is torch.Size([98]).

Mình muốn hỏi là làm sao để mình khác phục lỗi này ạ? Mình xin cảm ơn

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.