|Project Name||Stars||Downloads||Repos Using This||Packages Using This||Most Recent Commit||Total Releases||Latest Release||Open Issues||License||Language|
|Tts||9,590||5||16 hours ago||39||June 21, 2022||33||mpl-2.0||Python|
|🐸💬 - a deep learning toolkit for Text-to-Speech, battle-tested in research and production|
|Tts||6,557||3 months ago||7||mpl-2.0||Jupyter Notebook|
|:robot: :speech_balloon: Deep learning for Text to Speech (Discussion forum: https://discourse.mozilla.org/c/tts)|
|Nemo||6,059||2||5||31 minutes ago||58||July 01, 2022||71||apache-2.0||Python|
|NeMo: a toolkit for conversational AI|
|Vits||2,365||25 days ago||93||mit||Python|
|VITS: Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech|
|Openseq2seq||1,393||2 years ago||85||apache-2.0||Python|
|Toolkit for efficient experimentation with Speech Recognition, Text2Speech and NLP|
|Merlin||1,189||3 years ago||185||other||Python|
|This is now the official location of the Merlin project.|
|Voice Cloning App||879||2 months ago||27||bsd-3-clause||Python|
|A Python/Pytorch app for easily synthesising human voices|
|Transformertts||833||a year ago||39||other||Python|
|🤖💬 Transformer TTS: Implementation of a non-autoregressive Transformer based neural network for text to speech.|
|Forwardtacotron||487||2 years ago||n,ull||mit||Python|
|⏩ Generating speech in a single forward pass without any attention!|
|Diffwave||425||6 months ago||6||apache-2.0||Python|
|DiffWave is a fast, high-quality neural vocoder and waveform synthesizer.|
TTS is a library for advanced Text-to-Speech generation. It's built on the latest research, was designed to achieve the best trade-off among ease-of-training, speed and quality. TTS comes with pretrained models, tools for measuring dataset quality and already used in 20+ languages for products and research projects.
📢 English Voice Samples and SoundCloud playlist
📄 Text-to-Speech paper collection
Please use our dedicated channels for questions and discussion. Help is much more valuable if it's shared publicly, so that more people can benefit from it.
|🚨 Bug Reports||GitHub Issue Tracker|
|🎁 Feature Requests & Ideas||GitHub Issue Tracker|
|👩💻 Usage Questions||Discourse Forum|
|🗯 General Discussion||Discourse Forum and Matrix Channel|
|👩🏾🏫 Tutorials and Examples||TTS/Wiki|
|🚀 Released Models||TTS/Wiki|
|💻 Docker Image||Repository by @synesthesiam|
|🖥️ Demo Server||TTS/server|
|🤖 Running TTS on Terminal||TTS/README.md|
|✨ How to contribute||TTS/README.md|
"Mozilla*" and "Judy*" are our models. Details...
You can also help us implement more models. Some TTS related work can be found here.
TTS supports python >= 3.6, <3.9.
If you are only interested in synthesizing speech with the released TTS models, installing from PyPI is the easiest option.
pip install TTS
If you plan to code or train models, clone TTS and install it locally.
git clone https://github.com/mozilla/TTS pip install -e .
|- notebooks/ (Jupyter Notebooks for model evaluation, parameter selection and data analysis.) |- utils/ (common utilities.) |- TTS |- bin/ (folder for all the executables.) |- train*.py (train your target model.) |- distribute.py (train your TTS model using Multiple GPUs.) |- compute_statistics.py (compute dataset statistics for normalization.) |- convert*.py (convert target torch model to TF.) |- tts/ (text to speech models) |- layers/ (model layer definitions) |- models/ (model definitions) |- tf/ (Tensorflow 2 utilities and model implementations) |- utils/ (model specific utilities.) |- speaker_encoder/ (Speaker Encoder models.) |- (same) |- vocoder/ (Vocoder models.) |- (same)
Below you see Tacotron model state after 16K iterations with batch-size 32 with LJSpeech dataset.
"Recent research at Harvard has shown meditating for as little as 8 weeks can actually increase the grey matter in the parts of the brain responsible for emotional regulation and learning."
Audio examples: soundcloud
TTS provides a generic dataloader easy to use for your custom dataset.
You just need to write a simple function to format the dataset. Check
datasets/preprocess.py to see some examples.
After that, you need to set
dataset fields in
Some of the public datasets that we successfully applied TTS:
After the installation, TTS provides a CLI interface for synthesizing speech using pre-trained models. You can either use your own model or the release models under the TTS project.
Listing released TTS models.
Run a tts and a vocoder model from the released model list. (Simply copy and paste the full model names from the list as arguments for the command below.)
tts --text "Text for TTS" \ --model_name "<type>/<language>/<dataset>/<model_name>" \ --vocoder_name "<type>/<language>/<dataset>/<model_name>" \ --out_path folder/to/save/output/
Run your own TTS model (Using Griffin-Lim Vocoder)
tts --text "Text for TTS" \ --model_path path/to/model.pth.tar \ --config_path path/to/config.json \ --out_path output/path/speech.wav
Run your own TTS and Vocoder models
tts --text "Text for TTS" \ --model_path path/to/config.json \ --config_path path/to/model.pth.tar \ --out_path output/path/speech.wav \ --vocoder_path path/to/vocoder.pth.tar \ --vocoder_config_path path/to/vocoder_config.json
Note: You can use
./TTS/bin/synthesize.py if you prefer running
tts from the TTS project folder.
Here you can find a CoLab notebook for a hands-on example, training LJSpeech. Or you can manually follow the guideline below.
To start with, split
metadata.csv into train and validation subsets respectively
metadata_val.csv. Note that for text-to-speech, validation performance might be misleading since the loss value does not directly measure the voice quality to the human ear and it also does not measure the attention module performance. Therefore, running the model with new sentences and listening to the results is the best way to go.
shuf metadata.csv > metadata_shuf.csv head -n 12000 metadata_shuf.csv > metadata_train.csv tail -n 1100 metadata_shuf.csv > metadata_val.csv
To train a new model, you need to define your own
config.json to define model details, trainin configuration and more (check the examples). Then call the corressponding train script.
For instance, in order to train a tacotron or tacotron2 model on LJSpeech dataset, follow these steps.
python TTS/bin/train_tacotron.py --config_path TTS/tts/configs/config.json
To fine-tune a model, use
python TTS/bin/train_tacotron.py --config_path TTS/tts/configs/config.json --restore_path /path/to/your/model.pth.tar
To continue an old training run, use
python TTS/bin/train_tacotron.py --continue_path /path/to/your/run_folder/
For multi-GPU training, call
distribute.py. It runs any provided train script in multi-GPU setting.
CUDA_VISIBLE_DEVICES="0,1,4" python TTS/bin/distribute.py --script train_tacotron.py --config_path TTS/tts/configs/config.json
Each run creates a new output folder accomodating used
config.json, model checkpoints and tensorboard logs.
In case of any error or intercepted execution, if there is no checkpoint yet under the output folder, the whole folder is going to be removed.
You can also enjoy Tensorboard, if you point Tensorboard argument
--logdir to the experiment folder.
This repository is governed by Mozilla's code of conduct and etiquette guidelines. For more details, please read the Mozilla Community Participation Guidelines.
pip install pylint cardboardlint cardboardlinter --refspec master
devbranch, explain what the change is about.
devbranch once things look good.
Feel free to ping us at any step you need help using our communication channels.
If you like to use TTS to try a new idea and like to share your experiments with the community, we urge you to use the following guideline for a better collaboration. (If you have an idea for better collaboration, let us know)