Skip to content

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

License

Notifications You must be signed in to change notification settings

minopeef/TransformerTTS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intergrating Transformer TTS to any project

Pre requirements

  • Python >= 3.9
  • Clone git repository in your project root directory
git clone https://github.com/okpyjs/TransformerTTS.git

Installation

  • Install espeak as phonemizer backend
sudo apt-get install 
  • Install virtual environment
virtualenv venv
source venv/bin/activate
  • Install dependencies
pip install -r TransformerTTS/requirements.txt

Usage

  • Add following code to your script
import sys
sys.path.append('TransformerTTS/')

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)

Use pre-trained model from command line with

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%