Coder Social home page Coder Social logo

vlozg / voicefilter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maum-ai/voicefilter

0.0 0.0 0.0 63.89 MB

Unofficial PyTorch implementation of Google AI's VoiceFilter system

Home Page: http://swpark.me/voicefilter

Python 96.78% Shell 3.22%

voicefilter's Introduction

VoiceFilter

Dependencies

  1. Python and packages

    This code was tested on Python 3.8 with PyTorch 1.10.0. Other packages can be installed by:

    pip install -r requirements.txt

Prepare Dataset

  1. Download LibriSpeech dataset

    Install axel first (apt install axel).

    Use axel to download datasets.

    axel -n 10 -a -c "https://www.openslr.org/resources/12/train-clean-100.tar.gz"
    axel -n 10 -a -c "https://www.openslr.org/resources/12/train-clean-360.tar.gz"
    axel -n 10 -a -c "https://www.openslr.org/resources/12/dev-clean.tar.gz"
    axel -n 10 -a -c "https://www.openslr.org/resources/12/test-clean.tar.gz"

    Then, unzip tar.gz file to datasets folder:

    tar -xvzf train-clear-100.tar.gz
    tar -xvzf train-clear-360.tar.gz
    tar -xvzf dev-clean.tar.gz
    tar -xvzf test-clean.tar.gz
  2. Edit config.yaml

    cd config
    cp default.yaml config.yaml

Train VoiceFilter

  1. Get pretrained model for speaker recognition system

    The model can be downloaded at this GDrive link.

    Using gdown command for convenient download (gdown was installed via pip).

    gdown --id 1YFmhmUok-W76JkrfA0fzQt3c-ZsfiwfL
  2. Run

    After specifying train_dir, test_dir at config.yaml, run:

    python train.py -c [config.yaml] -e [path of embedder pt file] -m [name] --train_set [list of datasets used to generate train data] --test_set [list of datasets used to generate test data]

    This will create chkpt/name and logs/name at base directory(-b option, . in default)

    For reproducing the original experiment, use: the following bash command:

    python train.py -c config.yaml -e embedder.pt -m powlaw_loss --train_set librispeech-train --test_set librispeech-test

    Supported dataset include (for detail implementation, see the source code in datasets/GenerateDataset.py): librispeech-train, librispeech-test, vctk , vin, voxceleb1-train, voxceleb1-test, voxceleb2-train , voxceleb1-test, zalo-train, zalo-test

  3. View tensorboardX

    tensorboard --logdir ./logs
  4. Resuming from checkpoint

    python trainer.py -c [config yaml] --checkpoint_path [chkpt/name/chkpt_{step}.pt] -e [path of embedder pt file] -m name --train_set [list of datasets used to generate train data] --test_set [list of datasets used to generate test data]

    For example, finetune with VN dataset:

    python train.py -c config.yaml -e embedder.pt -m powlaw_loss_finetune --checkpoint_path chkpt/powlaw_loss/chkpt_168000.pt --train_set vin zalo-train --test_set zalo-test

License

Apache License 2.0

This repository contains codes adapted/copied from the followings:

voicefilter's People

Contributors

vlozg 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.