PyTorch implementation of Natural TTS Synthesis By Conditioning Wavenet On Mel Spectrogram Predictions.
Tested on CUDA 11.3 with CUDNN and pytorch 1.8, python 3.8 In this version of tacotron2 many new tweaks are added.
MODEL_NAME="mike" CONFIG=configs/config_mike.yaml MESSAGE="mike forward" OUT_PATH=/home/frappuccino/tts_checkpoints/mike/v2_forward/ RUN_ID="150622_01f" ./train.sh
check script before running! it sets as training from scratch on ljspeech by default! maybe you would need to fine-tune from pre-train after training, script would make bert vectors & train tpse and also trace model with embedded scale stats
logs will be sent to wandb.ai. At the first run it will ask you for your credentials. Register and paste into terminal. Good results on LJSpeech are expected to come after 6 hours of training on 2 RTX 3090 with fp16 and batch 128 on each gpu (10k iters)
cd text-to-speechconda create -n tts python=3.8 && conda activate ttsconda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorchpip install -r requirements.txtsudo apt install libsndfile1sed -i -- 's,DUMMY,ljs_dataset_folder/wavs,g' filelists/ljspeech/*.txtAdditionally and optionally, for adding pauses into training data, you need to get text-to-audio alignments. It is achieved through montreal-forced-aligner: example
python scripts/3_prepare_mfa.py filelists/python scripts/4_extend_dict.py WAVS_DIR librispeech-lexicon.txt NEW_LEXICONmfa model download acoustic english_us_arpamfa align -j 32 WAVS_DIR LEXICON english_us_arpa ALIGNMENTS_PATH -v --cleanPYTHONPATH=. python scripts/make_pauses_from_alignments.py --input_dir filelists/ --alignments_path ALIGNMENTS_PATHFre-GAN is an improvement over HifiGAN achieving same level of quality with 5x less training time.
config.json in fre-gan/ folder and ground-truth mel-spectrograms (4 gpus)cd fre-gan, `python train.py --input_mels_dir LJ_MELS --checkpoint_path CHECKPOINT_PATH --config config.jsonCUDA_VISIBLE_DEVICES=0,1 python teacher_forcing.py --checkpoint_dir /home/frappuccino/outdir/mike_130622_03f/
it will create mels_gen/ folder close to mels/ in dataset folderconfig.json and run training with new --input_mels_dir provided and --fine_tuning flag
Make sure though you specified new checkpoint path but you have put latest generator and discriminator from pre-trainpython trace.py -c CHECKPOINT_PATH --out_path $OUT_PATH/generator.pthjupyter notebook --ip=0.0.0.0 --no-browserdemo.pyN.b. When performing Mel-Spectrogram to Audio synthesis, make sure Tacotron 2 and the Mel vocoder were trained on the same mel-spectrogram representation.

If you have any questions, you can raise them in issues or, alternatively, ask them in our telegram chat.
Follow us for new updates in our telegram channel.
1 commits
Python
98.6%
Shell
1.4%
PyTorch implementation of Natural TTS Synthesis By Conditioning Wavenet On Mel Spectrogram Predictions.
Tested on CUDA 11.3 with CUDNN and pytorch 1.8, python 3.8 In this version of tacotron2 many new tweaks are added.
MODEL_NAME="mike" CONFIG=configs/config_mike.yaml MESSAGE="mike forward" OUT_PATH=/home/frappuccino/tts_checkpoints/mike/v2_forward/ RUN_ID="150622_01f" ./train.sh
check script before running! it sets as training from scratch on ljspeech by default! maybe you would need to fine-tune from pre-train after training, script would make bert vectors & train tpse and also trace model with embedded scale stats
logs will be sent to wandb.ai. At the first run it will ask you for your credentials. Register and paste into terminal. Good results on LJSpeech are expected to come after 6 hours of training on 2 RTX 3090 with fp16 and batch 128 on each gpu (10k iters)
cd text-to-speechconda create -n tts python=3.8 && conda activate ttsconda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorchpip install -r requirements.txtsudo apt install libsndfile1sed -i -- 's,DUMMY,ljs_dataset_folder/wavs,g' filelists/ljspeech/*.txtAdditionally and optionally, for adding pauses into training data, you need to get text-to-audio alignments. It is achieved through montreal-forced-aligner: example
python scripts/3_prepare_mfa.py filelists/python scripts/4_extend_dict.py WAVS_DIR librispeech-lexicon.txt NEW_LEXICONmfa model download acoustic english_us_arpamfa align -j 32 WAVS_DIR LEXICON english_us_arpa ALIGNMENTS_PATH -v --cleanPYTHONPATH=. python scripts/make_pauses_from_alignments.py --input_dir filelists/ --alignments_path ALIGNMENTS_PATHFre-GAN is an improvement over HifiGAN achieving same level of quality with 5x less training time.
config.json in fre-gan/ folder and ground-truth mel-spectrograms (4 gpus)cd fre-gan, `python train.py --input_mels_dir LJ_MELS --checkpoint_path CHECKPOINT_PATH --config config.jsonCUDA_VISIBLE_DEVICES=0,1 python teacher_forcing.py --checkpoint_dir /home/frappuccino/outdir/mike_130622_03f/
it will create mels_gen/ folder close to mels/ in dataset folderconfig.json and run training with new --input_mels_dir provided and --fine_tuning flag
Make sure though you specified new checkpoint path but you have put latest generator and discriminator from pre-trainpython trace.py -c CHECKPOINT_PATH --out_path $OUT_PATH/generator.pthjupyter notebook --ip=0.0.0.0 --no-browserdemo.pyN.b. When performing Mel-Spectrogram to Audio synthesis, make sure Tacotron 2 and the Mel vocoder were trained on the same mel-spectrogram representation.

If you have any questions, you can raise them in issues or, alternatively, ask them in our telegram chat.
Follow us for new updates in our telegram channel.
1 commits
Python
98.6%
Shell
1.4%