We propose a lightweight end-to-end text-to-speech model using multi-band generation and inverse short-time Fourier transform. Our model is based on VITS, a high-quality end-to-end text-to-speech model, but adopts two changes for more efficient inference: 1) the most computationally expensive component is partially replaced with a simple inverse short-time Fourier transform, and 2) multi-band generation, with fixed or trainable synthesis filters, is used to generate waveforms. Unlike conventional lightweight models, which employ optimization or knowledge distillation separately to train two cascaded components, our method enjoys the full benefits of end-to-end optimization. Experimental results show that our model synthesized speech as natural as that synthesized by VITS, while achieving a real-time factor of 0.066 on an Intel Core i7 CPU, 4.1 times faster than VITS. Moreover, a smaller version of the model significantly outperformed a lightweight baseline model with respect to both naturalness and inference speed. Code and audio samples are available from https://github.com/MasayaKawamura/MB-iSTFT-VITS.
You can check the paper and demo page.
This repository is based on official VITS code.
You can train the iSTFT-VITS, multi-band iSTFT VITS (MB-iSTFT-VITS), and multi-stream iSTFT VITS (MS-iSTFT-VITS) using this repository.
We also provide the pretrained models.
apt-get install espeak
ln -s /path/to/LJSpeech-1.1/wavs DUMMY1
# Cython-version Monotonoic Alignment Search
cd monotonic_align
mkdir monotonic_align
python setup.py build_ext --inplace
Model | How to set up json file in configs | Sample of json file configuration |
---|---|---|
iSTFT-VITS | "istft_vits": true, "upsample_rates": [8,8], |
ljs_istft_vits.json |
MB-iSTFT-VITS | "subbands": 4, "mb_istft_vits": true, "upsample_rates": [4,4], |
ljs_mb_istft_vits.json |
MS-iSTFT-VITS | "subbands": 4, "ms_istft_vits": true, "upsample_rates": [4,4], |
ljs_ms_istft_vits.json |
In the case of MB-iSTFT-VITS training, run the following script
python train_latest.py -c configs/ljs_mb_istft_vits.json -m ljs_mb_istft_vits
After the training, you can check inference audio using inference.ipynb