← 开源
spring-media

TransformerTTS

🤖💬 Transformer TTS: Implementation of a non-autoregressive Transformer based neural network for text to speech.

ModelsAudio/Speech modelsPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
1.16k
Star
222
Fork
+0
本周
5
贡献者
创建于 2020-03-26 · 更新于 2026-10-01 · 今日第 11341 名
主要开发者

spring-media/TransformerTTS 排名第 11,341,有 1,162 个星标。

同类别比较

spring-media/TransformerTTS 排名第 11,341,此处有 8 个同类条目;bawangxx/XZVoice 排名第 11,340。

同类别比较
名称排名指标
deepmodeling/Uni-Mol11,324
语言:
Python
星标数:
1,167
分叉数:
183
简介:
Official Repository for the Uni-Mol Series Methods
cure-lab/MagicDrive11,331
语言:
Python
星标数:
1,165
分叉数:
52
简介:
[ICLR24] Official implementation of the paper “MagicDrive: Street View Generation with Diverse 3D Geometry Control”
Text-to-Audio/AudioLCM11,333
语言:
Python
星标数:
1,164
分叉数:
158
简介:
PyTorch Implementation of AudioLCM (ACM-MM'24): a efficient and high-quality text-to-audio generation with latent consistency model.
bawangxx/XZVoice11,340
语言:
Vue
星标数:
1,162
分叉数:
319
简介:
Free and open source text-to-speech software
Kyubyong/dc_tts11,351
语言:
Python
星标数:
1,159
分叉数:
360
简介:
A TensorFlow Implementation of DC-TTS: yet another text-to-speech model
shyamsn97/mario-gpt11,368
语言:
Python
星标数:
1,156
分叉数:
105
简介:
[Neurips 2023] Generating Mario Levels with GPT2. Code for the paper "MarioGPT: Open-Ended Text2Level Generation through Large Language Models" https://arxiv.org/abs/2302.05981
OpenGVLab/VisionLLM11,372
语言:
Python
星标数:
1,154
分叉数:
64
简介:
VisionLLM Series
mchong6/GANsNRoses11,400
语言:
Jupyter Notebook
星标数:
1,149
分叉数:
149
简介:
Official PyTorch repo for GAN's N' Roses. Diverse im2im and vid2vid selfie to anime translation.
关键参数与规格
关键参数与规格
参数值
语言Python
类别Models
子类别Audio/Speech models
关键词Text-to-speech
星标数1,162
分叉数222
贡献者5
创建日期2020-03-26
更新日期2026-10-01
1 天星标数0
7 天星标数0
排名11,341
上次排名11,288
排名变化-53
7 天星标排名12,981
上次 7 天星标排名13,001
7 天星标排名变化20
总星标排名9,951
上次总星标排名9,943
总星标排名变化-8
国家Germany
README 摘录

A Text-to-Speech Transformer in TensorFlow 2 Implementation of a non-autoregressive Transformer based neural network for Text-to-Speech (TTS). This repo is based, among others, on the following papers: Neural Speech Synthesis with Transformer Network FastSpeech: Fast, Robust and Controllable Text to Speech FastSpeech 2: Fast and High-Quality End-to-End Text to Speech FastPitch: Parallel Text-to-speech with Pitch Prediction Our pre-trained LJSpeech model is compatible with the pre-trained vocoders: MelGAN HiFiGAN

(older versions are available also for WaveRNN) For quick inference with these vocoders, checkout the Vocoding branch Non-Autoregressive Being non-autoregressive, this Transformer model is: Robust: No repeats and failed attention modes for challenging sentences. Fast: With no autoregression, predictions take a fraction of the time. Controllable: It is possible to control the speed and pitch of the generated utterance. These samples' spectrograms are converted using the pre-trained MelGAN vocoder. Try it out on Colab: Updates 06/20

: Added normalisation and pre-trained models compatible with the faster MelGAN vocoder. Autoregressive model is now specialized as an Aligner and Forward is now the only TTS model. Improved duration extraction with Dijkstra algorithm. 📖 Contents Installation API Dataset Training Prediction Model Weights Installation Make sure you have: Python >= 3. 6 Install espeak as phonemizer backend (for macOS use brew): Then install the rest with pip: Read the individual scripts for more command line arguments. Pre-Trained LJSpeech API Use our

pre-trained model (with Griffin-Lim) from command line with Or in a python script You can specify the model step with the flag (CL) or parameter (script). Steps from 60000 to 100000 are available at a frequency of 5K steps (60000, 65000, . IMPORTANT: make sure to checkout the correct repository version to use the API. Currently 493be6345341af0df3ae829de79c2793c9afd0ec Dataset You can directly use LJSpeech to create the training dataset. Configuration If training on LJSpeech, or if unsure, simply use to

create MelGAN or HiFiGAN compatible models **EDIT PATHS**: in edit the paths to point at your dataset and log folders Custom dataset Prepare a folder containing your metadata and wav files, for instance if has the following format you can use the ljspeech preprocessor in , otherwise add your own under the same file. Make sure that: the metadata reader function name is the same as field in . the metadata file (can be anything) is specified under in Training Change the

argument based on the configuration of your choice. Train Aligner Model Create training dataset This will populate the training data directory (default ). Training Train TTS Model Compute alignment dataset First use the aligner model to create the durations dataset this will add the as well as the char-wise pitch folders to the training data directory. Training Training & Model configuration Training and model settings can be configured in Resume or restart training To resume training simply use the same configuration

files To restart training, delete the weights and/or the logs from the logs folder with the training flag (both

常见问题

记录了多少星标和分叉?

spring-media/TransformerTTS 有 1,162 个星标和 222 个分叉。

仓库排名是多少?

spring-media/TransformerTTS 排名第 11,341。

记录的语言和类别是什么?

spring-media/TransformerTTS 有 1,162 个星标,语言为 Python,类别为 Models。

哪个仓库排名最接近?

spring-media/TransformerTTS 与 bawangxx/XZVoice 比较,后者排名第 11,340,有 1,162 个星标。

README
 ![](https://raw.githubusercontent.com/as-ideas/TransformerTTS/master/docs/transformer_logo.png) 

A Text-to-Speech Transformer in TensorFlow 2

Implementation of a non-autoregressive Transformer based neural network for Text-to-Speech (TTS).

This repo is based, among others, on the following papers:

Our pre-trained LJSpeech model is compatible with the pre-trained vocoders:

(older versions are available also for WaveRNN)

For quick inference with these vocoders, checkout the Vocoding branch

Non-Autoregressive

Being non-autoregressive, this Transformer model is:

  • Robust: No repeats and failed attention modes for challenging sentences.
  • Fast: With no autoregression, predictions take a fraction of the time.
  • Controllable: It is possible to control the speed and pitch of the generated utterance.

🔈 Samples

Can be found here.

These samples' spectrograms are converted using the pre-trained MelGAN vocoder.

Try it out on Colab:

Updates

  • 06/20: Added normalisation and pre-trained models compatible with the faster MelGAN vocoder.
  • 11/20: Added pitch prediction. Autoregressive model is now specialized as an Aligner and Forward is now the only TTS model. Changed models architectures. Discontinued WaveRNN support. Improved duration extraction with Dijkstra algorithm.
  • 03/20: Vocoding branch.

📖 Contents

Installation

Make sure you have:

  • Python >= 3.6

Install espeak as phonemizer backend (for macOS use brew):

sudo apt-get install espeak

Then install the rest with pip:

pip install -r requirements.txt

Read the individual scripts for more command line arguments.

Pre-Trained LJSpeech API

Use our pre-trained model (with Griffin-Lim) from command line with

python predict_tts.py -t "Please, say something."

Or in a python script

from data.audio import Audio
from model.factory import tts_ljspeech

model = tts_ljspeech()
audio = Audio.from_config(model.config)
out = model.predict('Please, say something.')

# Convert spectrogram to wav (with griffin lim)
wav = audio.reconstruct_waveform(out['mel'].numpy().T)

You can specify the model step with the --step flag (CL) or step parameter (script).

Steps from 60000 to 100000 are available at a frequency of 5K steps (60000, 65000, ..., 95000, 100000).

IMPORTANT: make sure to checkout the correct repository version to use the API.

Currently 493be6345341af0df3ae829de79c2793c9afd0ec

Dataset

You can directly use LJSpeech to create the training dataset.

Configuration

  • If training on LJSpeech, or if unsure, simply use config/training_config.yaml to create MelGAN or HiFiGAN compatible models
    • swap the content of data_config_wavernn.yaml in config/training_config.yaml to create models compatible with WaveRNN
  • EDIT PATHS: in config/training_config.yaml edit the paths to point at your dataset and log folders

Custom dataset

Prepare a folder containing your metadata and wav files, for instance

|- dataset_folder/
|   |- metadata.csv
|   |- wavs/
|       |- file1.wav
|       |- ...

if metadata.csv has the following format wav_file_name|transcription you can use the ljspeech preprocessor in data/metadata_readers.py, otherwise add your own under the same file.

Make sure that:

  • the metadata reader function name is the same as data_name field in training_config.yaml.
  • the metadata file (can be anything) is specified under metadata_path in training_config.yaml

Training

Change the --config argument based on the configuration of your choice.

Train Aligner Model

Create training dataset

python create_training_data.py --config config/training_config.yaml

This will populate the training data directory (default transformer_tts_data.ljspeech).

Training

python train_aligner.py --config config/training_config.yaml

Train TTS Model

Compute alignment dataset

First use the aligner model to create the durations dataset

python extract_durations.py --config config/training_config.yaml

this will add the durations. as well as the char-wise pitch folders to the training data directory.

Training

python train_tts.py --config config/training_config.yaml

Training & Model configuration

  • Training and model settings can be configured in training_config.yaml

Resume or restart training

  • To resume training simply use the same configuration files
  • To restart training, delete the weights and/or the logs from the logs folder with the training flag --reset_dir (both) or --reset_logs, --reset_weights

Monitor training

tensorboard --logdir /logs/directory/

Prediction

With model weights

From command line with

python predict_tts.py -t "Please, say something." -p /path/to/weights/

Or in a python script

from model.models import ForwardTransformer
from data.audio import Audio
model = ForwardTransformer.load_model('/path/to/weights/')
audio = Audio.from_config(model.config)
out = model.predict('Please, say something.')

# Convert spectrogram to wav (with griffin lim)
wav = audio.reconstruct_waveform(out['mel'].numpy().T)

Model Weights

Access the pre-trained models with the API call.

Old weights

Model URL Commit Vocoder Commit
ljspeech_tts_model 0cd7d33 aca5990
ljspeech_melgan_forward_model 1c1cb03 aca5990
ljspeech_melgan_autoregressive_model_v2 1c1cb03 aca5990
ljspeech_wavernn_forward_model 1c1cb03 3595219
ljspeech_wavernn_autoregressive_model_v2 1c1cb03 3595219
ljspeech_wavernn_forward_model d9ccee6 3595219
ljspeech_wavernn_autoregressive_model_v2 d9ccee6 3595219
ljspeech_wavernn_autoregressive_model_v1 2f3a1b5 3595219

Maintainers

Special thanks

MelGAN and WaveRNN: data normalization and samples' vocoders are from these repos.

Erogol and the Mozilla TTS team for the lively exchange on the topic.

Copyright

See LICENSE for details.

排名相邻
同类项目