GithubHelp home page GithubHelp logo

whitefu / torch-styleddpm-vc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from entn-at/torch-styleddpm-vc

0.0 0.0 0.0 116 KB

Torch implementation of UNIT-DDPM for voice conversion

License: MIT License

Python 100.00%

torch-styleddpm-vc's Introduction

torch-styleddpm-vc

Torch implementation of StyleDDPM for voice conversion

  • StarGANv2-VC: A Diverse, Unsupervised, Non-parallel Framework for Natural-Sounding Voice Conversion, Li et al., 2021. [arXiv:2107.10394]
  • VDM: Variational diffusion models, Kingma et al., 2021. [arXiv:2107.00630]
  • UNIT-DDPM: UNpaired Image Translation with Denoising Diffusion Probabilistic Models, Sasaki et al., 2021. [arXiv:2104.05358]
  • MAE: Masked Autoencoders Are Scalable Vision Learners, He et al., 2021. [arXiv:2111.06377]
  • StyleGAN2: Analyzing and Improving the Image Quality of StyleGAN, Karras et al., 2019. [arXiv:1912.04958]

Requirements

Tested in python 3.9.12 conda environment, ref requirements.

Usage

Initialize the submodule and patch.

git submodule init --update
cd hifigan; patch -p0 < ../hifigan-diff

Download LibriTTS dataset from openslr

Dump the preprocessed LibriTTS dataset.

python -m utils.vcdataset \
    --data-dir /datasets/LibriTTS/train-clean-360 \
    --out-dir /datasets/LibriTTS/train-clean-360-dump \
    --num-proc 8 \
    --chunksize 16 \
    --device cuda

To train model, run train.py

python train.py \
    --data-dir /datasets/LibriTTS/train-clean-360-dump \
    --from-dump

To start to train from previous checkpoint, --load-epoch is available.

python train.py \
    --data-dir /datasets/LibriTTS/train-clean-360-dump \
    --from-dump \
    --load-epoch 20 \
    --config ./ckpt/t1.json

Checkpoint will be written on TrainConfig.ckpt, tensorboard summary on TrainConfig.log.

tensorboard --logdir ./log

[TODO] To inference model, run inference.py

[TODO] Pretrained checkpoints are relased on releases.

To use pretrained model, download files and unzip it. Followings are sample script.

from config import Config
from styleddpm import StyleDDPMVC

with open('t1.json') as f:
    config = Config.load(json.load(f))

ckpt = torch.load('t1_200.ckpt', map_location='cpu')

vc = StyleDDPMVC(config.model)
vc.load(ckpt)
vc.eval()

[TODO] Learning curve

[TODO] Figures

[TODO] Samples

torch-styleddpm-vc's People

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.