Git Product home page Git Product logo

tf-glow-tts's Introduction

tf-glow-tts

(Unofficial) Tensorflow implementation of Glow-TTS, Jaehyeon Kim et al., in NeurIPS 2020.

Requirements

Tested in python 3.8.5 windows10 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.ljspeech import LJSpeech

# lj = LJSpeech(data_dir=path, download=True)
lj = LJSpeech(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-epoch is available.

python .\train.py --load-epoch 20 --config D:\tf\ckpt\glowtts.json

To inference the audio, run inference.py.
Since this code is for POC, only alphabets and several special characters are available, reference TextNormalizer.GRAPHEMES.

python .\inference.py
    --config D:\tf\ckpt\glowtts.json
    --ckpt D:\tf\ckpt\glowtts\glowtts_20.ckpt-1
    --text "Hello, my name is revsic"

Pretrained checkpoints are relased on releases.

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

from config import Config
from glowtts import GlowTTS

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

tts = GlowTTS(config.model)
tts.restore('./glowtts_20.ckpt-1').expect_partial()

Learning Curve

train LJSpeech 20 epochs with tf-diffwave

loss sample

Samples

Reference https://revsic.github.io/tf-glow-tts.

tf-glow-tts's People

Contributors

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