2019-09-20 19:49:30 +00:00
|
|
|
# Taco2 TTS
|
|
|
|
|
|
|
|
|
|
[](https://github.com/python/black)
|
|
|
|
|
|
2019-10-04 10:45:30 +00:00
|
|
|
> Generates speech audio from text
|
2019-09-20 19:49:30 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Table of Contents
|
|
|
|
|
|
|
|
|
|
* [Features](#features)
|
|
|
|
|
* [Installation](#installation)
|
|
|
|
|
* [Usage](#usage)
|
|
|
|
|
|
|
|
|
|
# Features
|
|
|
|
|
|
2019-10-04 10:45:30 +00:00
|
|
|
* TTS using Tacotron2
|
2019-09-20 19:49:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# Installation
|
2019-10-04 10:45:30 +00:00
|
|
|
To install the packages and its dependencies run.
|
2019-09-20 19:49:30 +00:00
|
|
|
```bash
|
|
|
|
|
python setup.py install
|
|
|
|
|
```
|
2019-10-04 10:45:30 +00:00
|
|
|
or with pip
|
|
|
|
|
```bash
|
|
|
|
|
pip install .
|
|
|
|
|
```
|
2019-09-20 19:49:30 +00:00
|
|
|
|
2019-10-04 10:45:30 +00:00
|
|
|
The installation should work on Python 3.6 or newer. Untested on Python 2.7
|
2019-09-20 19:49:30 +00:00
|
|
|
|
|
|
|
|
# Usage
|
|
|
|
|
```python
|
2019-10-04 10:45:30 +00:00
|
|
|
from taco2.tts import TTSModel
|
|
|
|
|
tts_model = TTSModel("/path/to/tacotron2_model","/path/to/waveglow_model") # Loads the models
|
|
|
|
|
SPEECH_AUDIO = tts_model.synth_speech(TEXT) # Returns the wav buffer
|
2019-09-20 19:49:30 +00:00
|
|
|
```
|
2019-10-04 10:45:30 +00:00
|
|
|
If `'/path/to/waveglow_model'` is `None` *Griffin-Lim vocoder* will be used.
|