Giter Site home page Giter Site logo

rheehot / tf-diffwave Goto Github PK

View Code? Open in Web Editor NEW

This project forked from revsic/tf-diffwave

0.0 1.0 0.0 16.45 MB

Tensorflow implementation of DiffWave: A Versatile Diffusion Model for Audio Synthesis

Home Page: https://revsic.github.io/tf-diffwave

License: MIT License

Python 11.65% Jupyter Notebook 88.35%

tf-diffwave's Introduction

tf-diffwave

(Unofficial) Tensorflow implementation of DiffWave (Zhifeng Kong et al., 2020)

  • DiffWave: A Versatile Diffusion Model for Audio Synthesis, Zhifeng Kong et al., 2020. [arXiv:2009.09761]

Requirements

Tested in python 3.7.3 conda environment, requirements.txt

Usage

To download LJ-Speech dataset, run under script.

Dataset will be downloaded in '~/tensorflow_datasets' in tfrecord format. If you want to change the download directory, specify data_dir parameter of LJSpeech initializer.

from dataset import LJSpeech
from dataset.config import Config

config = Config()
# lj = LJSpeech(config, data_dir=path, download=True)
lj = LJSpeech(config, download=True) 

To train model, run train.py.

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

python train.py
tensorboard --logdir ./log/

If you want to train model from raw audio, specify audio directory and turn on the flag --from-raw.

python .\train.py --data-dir D:\LJSpeech-1.1\wavs --from-raw

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

python .\train.py --load-step 416 --config ./ckpt/q1.json

For experiments, reference expr.ipynb.

To inference test set, run inference.py.

python .\inference.py

Pretrained checkpoints are relased on releases.

To use pretrained model, download files and unzip it. Checkout git repository to proper commit tags and followings are sample script.

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

diffwave = DiffWave(config.model)
diffwave.restore('./l1/l1_1000000.ckpt-1').expect_partial()

Learning Curve

res.channels=64, T=20, train 1M steps.

loss

Samples

Reference https://revsic.github.io/tf-diffwave.

tf-diffwave's People

Contributors

revsic avatar sharvil avatar

Watchers

 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.