Skip to content

Commit c63bb48

Browse files
authored
Merge pull request #1027 from coqui-ai/dev
v0.5.0
2 parents 7f1a237 + e1accb6 commit c63bb48

69 files changed

Lines changed: 2978 additions & 423 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ In the worse case provide steps to reproduce the behaviour.
3737
You can either run `TTS/bin/collect_env_info.py`
3838
3939
```bash
40-
wget https://raw.githubusercontent.com/coqui-ai/TTS/main/TTS/bin/collect_env_details.py
41-
python collect_env_details.py
40+
wget https://raw.githubusercontent.com/coqui-ai/TTS/main/TTS/bin/collect_env_info.py
41+
python collect_env_info.py
4242
```
4343
4444
or fill in the fields below manually.

.github/workflows/aux_tests.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,22 @@ jobs:
2222
experimental: [false]
2323
steps:
2424
- uses: actions/checkout@v2
25-
- uses: actions/cache@v1
26-
with:
27-
path: ~/.cache/pip
28-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
2925
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v2
26+
uses: coqui-ai/setup-python@pip-cache-key-py-ver
3127
with:
3228
python-version: ${{ matrix.python-version }}
3329
architecture: x64
30+
cache: 'pip'
31+
cache-dependency-path: 'requirements*'
3432
- name: check OS
3533
run: cat /etc/os-release
3634
- name: Install dependencies
3735
run: |
38-
sudo apt update
39-
sudo apt install -y git make
40-
sudo apt install -y python3-wheel gcc
36+
sudo apt-get update
37+
sudo apt-get install -y git make gcc
4138
make system-deps
42-
- name: Upgrade pip
43-
run: python3 -m pip install --upgrade pip
39+
- name: Install/upgrade Python setup deps
40+
run: python3 -m pip install --upgrade pip setuptools wheel
4441
- name: Install TTS
4542
run: |
4643
python3 -m pip install .[all]

.github/workflows/pypi-release.yml

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defaults:
77
shell:
88
bash
99
jobs:
10-
build-package:
10+
build-sdist:
1111
runs-on: ubuntu-20.04
1212
steps:
1313
- uses: actions/checkout@v2
@@ -23,16 +23,74 @@ jobs:
2323
with:
2424
python-version: 3.8
2525
- run: |
26-
python -m pip install -U pip setuptools twine toml
27-
python -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip install -r /dev/stdin
26+
python -m pip install -U pip setuptools wheel build
2827
- run: |
29-
python setup.py sdist
28+
python -m build
29+
- run: |
30+
pip install dist/*.tar.gz
31+
- uses: actions/upload-artifact@v2
32+
with:
33+
name: sdist
34+
path: dist/*.tar.gz
35+
build-wheels:
36+
runs-on: ubuntu-20.04
37+
strategy:
38+
matrix:
39+
python-version: ["3.6", "3.7", "3.8", "3.9"]
40+
steps:
41+
- uses: actions/checkout@v2
42+
- uses: actions/setup-python@v2
43+
with:
44+
python-version: ${{ matrix.python-version }}
45+
- run: |
46+
python -m pip install -U pip setuptools wheel build
47+
- run: |
48+
python -m build
49+
- run: |
50+
python -m pip install dist/*.whl
51+
- uses: actions/upload-artifact@v2
52+
with:
53+
name: wheel-${{ matrix.python-version }}
54+
path: dist/*.whl
55+
publish-artifacts:
56+
runs-on: ubuntu-20.04
57+
needs: [build-sdist, build-wheels]
58+
steps:
59+
- run: |
60+
mkdir dist
61+
- uses: actions/download-artifact@v2
62+
with:
63+
name: "sdist"
64+
path: "dist/"
65+
- uses: actions/download-artifact@v2
66+
with:
67+
name: "wheel-3.6"
68+
path: "dist/"
69+
- uses: actions/download-artifact@v2
70+
with:
71+
name: "wheel-3.7"
72+
path: "dist/"
73+
- uses: actions/download-artifact@v2
74+
with:
75+
name: "wheel-3.8"
76+
path: "dist/"
77+
- uses: actions/download-artifact@v2
78+
with:
79+
name: "wheel-3.9"
80+
path: "dist/"
81+
- run: |
82+
ls -lh dist/
3083
- name: Setup PyPI config
3184
run: |
3285
cat << EOF > ~/.pypirc
3386
[pypi]
3487
username=__token__
3588
password=${{ secrets.PYPI_TOKEN }}
3689
EOF
90+
- uses: actions/setup-python@v2
91+
with:
92+
python-version: 3.8
93+
- run: |
94+
python -m pip install twine
3795
- run: |
38-
twine upload --repository pypi dist/*.tar.gz
96+
twine upload --repository pypi dist/*

.github/workflows/style_check.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,22 @@ jobs:
2222
experimental: [false]
2323
steps:
2424
- uses: actions/checkout@v2
25-
- uses: actions/cache@v1
26-
with:
27-
path: ~/.cache/pip
28-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
2925
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v2
26+
uses: coqui-ai/setup-python@pip-cache-key-py-ver
3127
with:
3228
python-version: ${{ matrix.python-version }}
3329
architecture: x64
30+
cache: 'pip'
31+
cache-dependency-path: 'requirements*'
3432
- name: check OS
3533
run: cat /etc/os-release
3634
- name: Install dependencies
3735
run: |
38-
sudo apt update
39-
sudo apt install -y git make
40-
sudo apt install -y python3-wheel gcc
36+
sudo apt-get update
37+
sudo apt-get install -y git make gcc
4138
make system-deps
42-
- name: Upgrade pip
43-
run: python3 -m pip install --upgrade pip
39+
- name: Install/upgrade Python setup deps
40+
run: python3 -m pip install --upgrade pip setuptools wheel
4441
- name: Install TTS
4542
run: |
4643
python3 -m pip install .[all]

.github/workflows/tts_tests.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,22 @@ jobs:
2222
experimental: [false]
2323
steps:
2424
- uses: actions/checkout@v2
25-
- uses: actions/cache@v1
26-
with:
27-
path: ~/.cache/pip
28-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
2925
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v2
26+
uses: coqui-ai/setup-python@pip-cache-key-py-ver
3127
with:
3228
python-version: ${{ matrix.python-version }}
3329
architecture: x64
30+
cache: 'pip'
31+
cache-dependency-path: 'requirements*'
3432
- name: check OS
3533
run: cat /etc/os-release
3634
- name: Install dependencies
3735
run: |
38-
sudo apt update
39-
sudo apt install -y git make
40-
sudo apt install -y python3-wheel gcc
36+
sudo apt-get update
37+
sudo apt-get install -y --no-install-recommends git make gcc
4138
make system-deps
42-
- name: Upgrade pip
43-
run: python3 -m pip install --upgrade pip
39+
- name: Install/upgrade Python setup deps
40+
run: python3 -m pip install --upgrade pip setuptools wheel
4441
- name: Install TTS
4542
run: |
4643
python3 -m pip install .[all]

.github/workflows/vocoder_tests.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,22 @@ jobs:
2222
experimental: [false]
2323
steps:
2424
- uses: actions/checkout@v2
25-
- uses: actions/cache@v1
26-
with:
27-
path: ~/.cache/pip
28-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
2925
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v2
26+
uses: coqui-ai/setup-python@pip-cache-key-py-ver
3127
with:
3228
python-version: ${{ matrix.python-version }}
3329
architecture: x64
30+
cache: 'pip'
31+
cache-dependency-path: 'requirements*'
3432
- name: check OS
3533
run: cat /etc/os-release
3634
- name: Install dependencies
3735
run: |
38-
sudo apt update
39-
sudo apt install -y git make
40-
sudo apt install -y python3-wheel gcc
36+
sudo apt-get update
37+
sudo apt-get install -y git make gcc
4138
make system-deps
42-
- name: Upgrade pip
43-
run: python3 -m pip install --upgrade pip
39+
- name: Install/upgrade Python setup deps
40+
run: python3 -m pip install --upgrade pip setuptools wheel
4441
- name: Install TTS
4542
run: |
4643
python3 -m pip install .[all]

.github/workflows/zoo_tests.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,22 @@ jobs:
2222
experimental: [false]
2323
steps:
2424
- uses: actions/checkout@v2
25-
- uses: actions/cache@v1
26-
with:
27-
path: ~/.cache/pip
28-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
2925
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v2
26+
uses: coqui-ai/setup-python@pip-cache-key-py-ver
3127
with:
3228
python-version: ${{ matrix.python-version }}
3329
architecture: x64
30+
cache: 'pip'
31+
cache-dependency-path: 'requirements*'
3432
- name: check OS
3533
run: cat /etc/os-release
3634
- name: Install dependencies
3735
run: |
38-
sudo apt update
39-
sudo apt install -y git make
40-
sudo apt install -y python3-wheel gcc
36+
sudo apt-get update
37+
sudo apt-get install -y git make gcc
4138
make system-deps
42-
- name: Upgrade pip
43-
run: python3 -m pip install --upgrade pip
39+
- name: Install/upgrade Python setup deps
40+
run: python3 -m pip install --upgrade pip setuptools wheel
4441
- name: Install TTS
4542
run: |
4643
python3 -m pip install .[all]

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ core
128128
recipes/WIP/*
129129
recipes/ljspeech/LJSpeech-1.1/*
130130
recipes/vctk/VCTK/*
131+
recipes/**/*.npy
132+
recipes/**/*.json
131133
VCTK-Corpus-removed-silence/*
132134

133135
# ignore training logs
@@ -161,4 +163,5 @@ speakers.json
161163
internal/*
162164
*_pitch.npy
163165
*_phoneme.npy
164-
wandb
166+
wandb
167+
depot/*

README.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# <img src="https://raw.githubusercontent.com/coqui-ai/TTS/main/images/coqui-log-green-TTS.png" height="56"/>
22

33
🐸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.
4-
🐸TTS comes with [pretrained models](https://github.com/coqui-ai/TTS/wiki/Released-Models), tools for measuring dataset quality and already used in **20+ languages** for products and research projects.
4+
🐸TTS comes with pretrained models, tools for measuring dataset quality and already used in **20+ languages** for products and research projects.
55

66
[![GithubActions](https://github.com/coqui-ai/TTS/actions/workflows/main.yml/badge.svg)](https://github.com/coqui-ai/TTS/actions)
77
[![PyPI version](https://badge.fury.io/py/TTS.svg)](https://badge.fury.io/py/TTS)
@@ -135,6 +135,66 @@ $ make install
135135

136136
If you are on Windows, 👑@GuyPaddock wrote installation instructions [here](https://stackoverflow.com/questions/66726331/how-can-i-run-mozilla-tts-coqui-tts-training-with-cuda-on-a-windows-system).
137137

138+
## Use TTS
139+
140+
### Single Speaker Models
141+
142+
- List provided models:
143+
144+
```
145+
$ tts --list_models
146+
```
147+
148+
- Run TTS with default models:
149+
150+
```
151+
$ tts --text "Text for TTS"
152+
```
153+
154+
- Run a TTS model with its default vocoder model:
155+
156+
```
157+
$ tts --text "Text for TTS" --model_name "<language>/<dataset>/<model_name>
158+
```
159+
160+
- Run with specific TTS and vocoder models from the list:
161+
162+
```
163+
$ tts --text "Text for TTS" --model_name "<language>/<dataset>/<model_name>" --vocoder_name "<language>/<dataset>/<model_name>" --output_path
164+
```
165+
166+
- Run your own TTS model (Using Griffin-Lim Vocoder):
167+
168+
```
169+
$ tts --text "Text for TTS" --model_path path/to/model.pth.tar --config_path path/to/config.json --out_path output/path/speech.wav
170+
```
171+
172+
- Run your own TTS and Vocoder models:
173+
```
174+
$ tts --text "Text for TTS" --model_path path/to/config.json --config_path path/to/model.pth.tar --out_path output/path/speech.wav
175+
--vocoder_path path/to/vocoder.pth.tar --vocoder_config_path path/to/vocoder_config.json
176+
```
177+
178+
### Multi-speaker Models
179+
180+
- List the available speakers and choose as <speaker_id> among them:
181+
182+
```
183+
$ tts --model_name "<language>/<dataset>/<model_name>" --list_speaker_idxs
184+
```
185+
186+
- Run the multi-speaker TTS model with the target speaker ID:
187+
188+
```
189+
$ tts --text "Text for TTS." --out_path output/path/speech.wav --model_name "<language>/<dataset>/<model_name>" --speaker_idx <speaker_id>
190+
```
191+
192+
- Run your own multi-speaker TTS model:
193+
194+
```
195+
$ tts --text "Text for TTS" --out_path output/path/speech.wav --model_path path/to/config.json --config_path path/to/model.pth.tar --speakers_file_path path/to/speaker.json --speaker_idx <speaker_id>
196+
```
197+
138198
## Directory Structure
139199
```
140200
|- notebooks/ (Jupyter Notebooks for model evaluation, parameter selection and data analysis.)

0 commit comments

Comments
 (0)