Git Product home page Git Product logo

lll-tts's Introduction

lll-tts

Code for our ICASSP 2022 paper: TOWARDS LIFELONG LEARNING OF MULTILINGUAL TEXT-TO-SPEECH SYNTHESIS. Audio demo is available here.

Install dependencies

Install a Pytorch version that is compatible to your CUDA setups. Then

pip install -r requirements.txt 

The baselines alrogithms require other dependencies. Please look at the corresponding repos (EWC, GEM) to install them.

Data preparation

  1. Download CSS10 corpus here. In this work, we only use four languages: German, Dutch, Chinese, Japanese.
  2. Move the downloaded archives to data/css10, and unzip the archives.
  3. Run the following command to prepare the spectrograms:
cd data/
python prepare_css_spectrograms.py

Training

We form a language sequence of German -- Dutch -- Chinese -- Japanese. The following commands assume that we have a model checkpoint trained on German, and we want to continually and sequentially train the model on the following three languages. We provide a pre-trained German checkpoint here.

Train the proposed data replay scheme with the dual-sampling strategy.

python train_continual.py --hyper_parameters dual_samp.json --save_dir exp_dual --checkpoint checkpoints_ge/checkpoints/SHARED-TRAINING_loss-99-0.147

The other sampling strategies in the paper, i.e. Random Sampling and Weighted sampling are also available. Simply change the hyper_parameters argument to the corresponding json config file under params/

Train baseline, Elastic Weight Consolidation (EWC).

python train_continual.py --hyper_parameters ewc.json --save_dir exp_ewc --checkpoint checkpoints_ge/checkpoints/SHARED-TRAINING_loss-99-0.147-fisher

Train baseline, Gradient Episodic Memory (GEM).

python train_continual.py --hyper_parameters gem.json --save_dir exp_gem --checkpoint checkpoints_ge/checkpoints/SHARED-TRAINING_loss-99-0.147

Train the lower-bound approach (fine-tune).

python train_continual.py --hyper_parameters finetune.json --save_dir exp_finetune --checkpoint checkpoints_ge/checkpoints/SHARED-TRAINING_loss-99-0.147

The upper-bound approach is to train a normal TTS model on all 4 languages jointly, not sequentially.

python train_joint.py --hyper_parameters joint.json --save_dir exp_joint

Inference

We use WaveRNN for vocoder. To generate waveforms, first download and setup the WaveRNN vocoder:

git clone https://github.com/Tomiinek/WaveRNN
# download the WaveRNN checkpoint trained on the entire CSS10 corpus
cd WaveRNN/
mkdir -p checkpoints && cd checkpoints
curl -O -L "https://github.com/Tomiinek/Multilingual_Text_to_Speech/releases/download/v1.0/wavernn_weight.pyt" 

Then append the path to the WaveRNN folder to the PYTHONPATH variable:

export PYTHONPATH=$PYTHONPATH:<absolute path to the WaveRNN dir>

Finally, use the following command to generate a waveform:

# at the root of this repo
python synthesize.py --tts_ckpt_path release_checkpoints/dual_samp/SHARED-TRAINING_loss-299-0.108 \
                     --wavernn_path <absolute path to the WaveRNN dir> \
                     --wavernn_ckpt_path <absolute path to the pre-trained WaveRNN checkpoint> \
                     --text "|fēi tè xìucái yīnwèi shàngchéng qù bàoguān, bèi bùhǎo de gémìngdǎng jiǎn le biànzǐ, érqiě yòu pòfèi le èrshí qiān de shǎngqián, suǒyǐ quánjiā yě hàotáo le。|chinese|chinese" \
                     --saved_wav generated.wav

The above command shows an example of synthesizing Chinese speech, using the model trained by our proposed dual-sampler method after the entire training sequence finished. We release a few trained models by different approaches. Models can be downloaded here.

Acknowledgements

Citation

Cite our paper!

@INPROCEEDINGS{9746968,
  author={Yang, Mu and Ding, Shaojin and Chen, Tianlong and Wang, Tong and Wang, Zhangyang},
  booktitle={ICASSP 2022 - 2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)}, 
  title={Towards Lifelong Learning of Multilingual Text-to-Speech Synthesis}, 
  year={2022},
  volume={},
  number={},
  pages={8022-8026},
  doi={10.1109/ICASSP43922.2022.9746968}}

lll-tts's People

Contributors

mu-y 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.