forked from jaywalnut310/vits
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da155dc
commit 2b91cef
Showing
32 changed files
with
116,071 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
DUMMY1 | ||
DUMMY2 | ||
DUMMY3 | ||
logs | ||
__pycache__ | ||
.ipynb_checkpoints | ||
.*.swp | ||
|
||
build | ||
*.c | ||
monotonic_align/monotonic_align |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech | ||
|
||
### Jaehyeon Kim, Sungwon Kim, Jungil Kong, and Sungroh Yoon | ||
|
||
In our recent [paper](https://arxiv.org/abs/???), we propose VITS: Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech. | ||
|
||
Several recent end-to-end text-to-speech (TTS) models enabling single-stage training and parallel sampling have been proposed, but their sample quality does not match that of two-stage TTS systems. In this work, we present a parallel end-to-end TTS method that generates more natural sounding audio than current two-stage models. Our method adopts variational inference augmented with normalizing flows and an adversarial training process, which improves the expressive power of generative modeling. We also propose a stochastic duration predictor to synthesize speech with diverse rhythms from input text. With the uncertainty modeling over latent variables and the stochastic duration predictor, our method expresses the natural one-to-many relationship in which a text input can be spoken in multiple ways with different pitches and rhythms. A subjective human evaluation (mean opinion score, or MOS) on the LJ Speech, a single speaker dataset, shows that our method outperforms the best publicly available TTS systems and achieves a MOS comparable to ground truth. | ||
|
||
Visit our [demo](https://jaywalnut310.github.io/vits-demo/index.html) for audio samples. | ||
|
||
We also provide the [pretrained models](https://drive.google.com/drive/folders/1ksarh-cJf3F5eKJjLVWY0X1j1qsQqiS2?usp=sharing). | ||
|
||
<table style="width:100%"> | ||
<tr> | ||
<th>VITS at training</th> | ||
<th>VITS at inference</th> | ||
</tr> | ||
<tr> | ||
<td><img src="resources/fig_1a.png" alt="VITS at training" height="400"></td> | ||
<td><img src="resources/fig_1b.png" alt="VITS at inference" height="400"></td> | ||
</tr> | ||
</table> | ||
|
||
|
||
## Pre-requisites | ||
0. Python >= 3.6 | ||
0. Clone this repository | ||
0. Install python requirements. Please refer [requirements.txt](requirements.txt) | ||
1. You may need to install espeak first: `apt-get install espeak` | ||
0. Download datasets | ||
1. Download and extract the LJ Speech dataset, then rename or create a link to the dataset folder: `ln -s /path/to/LJSpeech-1.1/wavs DUMMY1` | ||
1. For mult-speaker setting, download and extract the VCTK dataset, and downsample wav files to 22050 Hz. Then rename or create a link to the dataset folder: `ln -s /path/to/VCTK-Corpus/downsampled_wavs DUMMY2` | ||
0. Build Monotonic Alignment Search and run preprocessing if you use your own datasets. | ||
```sh | ||
# Cython-version Monotonoic Alignment Search | ||
cd monotonic_align | ||
python setup.py build_ext --inplace | ||
|
||
# Preprocessing (g2p) for your own datasets. Preprocessed phonemes for LJ Speech and VCTK have been already provided. | ||
# python preprocess.py --text_index 1 --filelists filelists/ljs_audio_text_train_filelist.txt filelists/ljs_audio_text_val_filelist.txt filelists/ljs_audio_text_test_filelist.txt | ||
# python preprocess.py --text_index 2 --filelists filelists/vctk_audio_sid_text_train_filelist.txt filelists/vctk_audio_sid_text_val_filelist.txt filelists/vctk_audio_sid_text_test_filelist.txt | ||
``` | ||
|
||
|
||
## Training Exmaple | ||
```sh | ||
# LJ Speech | ||
python train.py -c configs/ljs_base.json -m ljs_base | ||
|
||
# VCTK | ||
python train_ms.py -c configs/vctk_base.json -m vctk_base | ||
``` | ||
|
||
|
||
## Inference Example | ||
See [inference.ipynb](inference.ipynb) | ||
|
||
We provide [pretrained models](https://drive.google.com/drive/folders/1zdc4V0Cxt8DjqVOP5WyNBlz7TiYAdQj8?usp=sharing). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"train": { | ||
"log_interval": 200, | ||
"eval_interval": 1000, | ||
"seed": 1234, | ||
"epochs": 20000, | ||
"learning_rate": 2e-4, | ||
"betas": [0.8, 0.99], | ||
"eps": 1e-9, | ||
"batch_size": 64, | ||
"fp16_run": true, | ||
"lr_decay": 0.999875, | ||
"segment_size": 8192, | ||
"init_lr_ratio": 1, | ||
"warmup_epochs": 0, | ||
"c_mel": 45, | ||
"c_kl": 1.0 | ||
}, | ||
"data": { | ||
"training_files":"filelists/ljs_audio_text_train_filelist.txt.cleaned", | ||
"validation_files":"filelists/ljs_audio_text_val_filelist.txt.cleaned", | ||
"text_cleaners":["english_cleaners2"], | ||
"max_wav_value": 32768.0, | ||
"sampling_rate": 22050, | ||
"filter_length": 1024, | ||
"hop_length": 256, | ||
"win_length": 1024, | ||
"n_mel_channels": 80, | ||
"mel_fmin": 0.0, | ||
"mel_fmax": null, | ||
"add_blank": true, | ||
"n_speakers": 0, | ||
"cleaned_text": true | ||
}, | ||
"model": { | ||
"inter_channels": 192, | ||
"hidden_channels": 192, | ||
"filter_channels": 768, | ||
"n_heads": 2, | ||
"n_layers": 6, | ||
"kernel_size": 3, | ||
"p_dropout": 0.1, | ||
"resblock": "1", | ||
"resblock_kernel_sizes": [3,7,11], | ||
"resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]], | ||
"upsample_rates": [8,8,2,2], | ||
"upsample_initial_channel": 512, | ||
"upsample_kernel_sizes": [16,16,4,4], | ||
"n_layers_q": 3, | ||
"use_spectral_norm": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"train": { | ||
"log_interval": 200, | ||
"eval_interval": 1000, | ||
"seed": 1234, | ||
"epochs": 20000, | ||
"learning_rate": 2e-4, | ||
"betas": [0.8, 0.99], | ||
"eps": 1e-9, | ||
"batch_size": 64, | ||
"fp16_run": true, | ||
"lr_decay": 0.999875, | ||
"segment_size": 8192, | ||
"init_lr_ratio": 1, | ||
"warmup_epochs": 0, | ||
"c_mel": 45, | ||
"c_kl": 1.0 | ||
}, | ||
"data": { | ||
"training_files":"filelists/ljs_audio_text_train_filelist.txt.cleaned", | ||
"validation_files":"filelists/ljs_audio_text_val_filelist.txt.cleaned", | ||
"text_cleaners":["english_cleaners2"], | ||
"max_wav_value": 32768.0, | ||
"sampling_rate": 22050, | ||
"filter_length": 1024, | ||
"hop_length": 256, | ||
"win_length": 1024, | ||
"n_mel_channels": 80, | ||
"mel_fmin": 0.0, | ||
"mel_fmax": null, | ||
"add_blank": true, | ||
"n_speakers": 0, | ||
"cleaned_text": true | ||
}, | ||
"model": { | ||
"inter_channels": 192, | ||
"hidden_channels": 192, | ||
"filter_channels": 768, | ||
"n_heads": 2, | ||
"n_layers": 6, | ||
"kernel_size": 3, | ||
"p_dropout": 0.1, | ||
"resblock": "1", | ||
"resblock_kernel_sizes": [3,7,11], | ||
"resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]], | ||
"upsample_rates": [8,8,2,2], | ||
"upsample_initial_channel": 512, | ||
"upsample_kernel_sizes": [16,16,4,4], | ||
"n_layers_q": 3, | ||
"use_spectral_norm": false, | ||
"use_sdp": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"train": { | ||
"log_interval": 200, | ||
"eval_interval": 1000, | ||
"seed": 1234, | ||
"epochs": 10000, | ||
"learning_rate": 2e-4, | ||
"betas": [0.8, 0.99], | ||
"eps": 1e-9, | ||
"batch_size": 64, | ||
"fp16_run": true, | ||
"lr_decay": 0.999875, | ||
"segment_size": 8192, | ||
"init_lr_ratio": 1, | ||
"warmup_epochs": 0, | ||
"c_mel": 45, | ||
"c_kl": 1.0 | ||
}, | ||
"data": { | ||
"training_files":"filelists/vctk_audio_sid_text_train_filelist.txt.cleaned", | ||
"validation_files":"filelists/vctk_audio_sid_text_val_filelist.txt.cleaned", | ||
"text_cleaners":["english_cleaners2"], | ||
"max_wav_value": 32768.0, | ||
"sampling_rate": 22050, | ||
"filter_length": 1024, | ||
"hop_length": 256, | ||
"win_length": 1024, | ||
"n_mel_channels": 80, | ||
"mel_fmin": 0.0, | ||
"mel_fmax": null, | ||
"add_blank": true, | ||
"n_speakers": 109, | ||
"cleaned_text": true | ||
}, | ||
"model": { | ||
"inter_channels": 192, | ||
"hidden_channels": 192, | ||
"filter_channels": 768, | ||
"n_heads": 2, | ||
"n_layers": 6, | ||
"kernel_size": 3, | ||
"p_dropout": 0.1, | ||
"resblock": "1", | ||
"resblock_kernel_sizes": [3,7,11], | ||
"resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]], | ||
"upsample_rates": [8,8,2,2], | ||
"upsample_initial_channel": 512, | ||
"upsample_kernel_sizes": [16,16,4,4], | ||
"n_layers_q": 3, | ||
"use_spectral_norm": false, | ||
"gin_channels": 256 | ||
} | ||
} |
Oops, something went wrong.