Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.24.3 #128

Merged
merged 25 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
17ca24c
fix: load weights only in torch.load
shavit Aug 31, 2024
86b58fb
fix: define torch safe globals for torch.load
eginhard Sep 12, 2024
659b485
chore(bark): remove manual download of hubert model
eginhard Sep 12, 2024
f5e2148
ci: explicitly upload hidden files for coverage
eginhard Sep 12, 2024
e5dd06b
Merge pull request #77 from shavit/71-torch-load
eginhard Sep 12, 2024
0a18418
build: allow numpy2, which should be supported in spacy 3.8 now (#81)
eginhard Sep 13, 2024
3e8125c
ci: switch to cibuildwheel
eginhard Sep 17, 2024
36611a7
feat: normalize unicode characters in text cleaners (#85)
shavit Oct 2, 2024
f75d095
fix(build): restrict spacy version to unbreak installation (#92)
KoljaB Oct 4, 2024
6c2e0be
chore: bump version to 0.24.2
eginhard Oct 4, 2024
073f8de
Merge pull request #95 from idiap/cibuildwheel
eginhard Oct 4, 2024
018d4ba
fix(xtts): support transformers>=4.43.0 in streaming inference
JohnnyStreet Oct 5, 2024
a510ec3
build(uv): add constraint on numba to avoid resolution error
eginhard Oct 20, 2024
ad435b5
build: again restrict to numpy<2
eginhard Oct 20, 2024
b66c782
Merge pull request #109 from idiap/transformers
eginhard Oct 21, 2024
964b813
fix(gpt): set attention mask and address other warnings
eginhard Oct 25, 2024
88de5c4
Merge pull request #114 from idiap/gpt-warnings
eginhard Oct 26, 2024
47ad0bf
fix(text.characters): add nasal diacritic (#127)
eginhard Nov 4, 2024
8e66be2
fix: only enable load with weights_only in pytorch>=2.4
eginhard Oct 25, 2024
ce5c492
ci: simplify ci by using uv where possible
eginhard Oct 20, 2024
f6a4d5e
chore: bump version to 0.24.3
eginhard Nov 4, 2024
6314032
Merge pull request #113 from idiap/pytorch
eginhard Nov 4, 2024
efc7615
Merge branch 'dev' into sync
eginhard Nov 4, 2024
45b8b5b
build: set upper version limit for trainer (#130)
eginhard Nov 5, 2024
3b47521
Merge branch 'dev' into sync
eginhard Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/style_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ jobs:
fail-fast: false
matrix:
python-version: [3.9]
experimental: [false]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'pip'
cache-dependency-path: 'requirements*'
- name: Install/upgrade dev dependencies
run: python3 -m pip install -r requirements.dev.txt
version: "0.4.27"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Lint check
run: make lint
40 changes: 16 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@ jobs:
subset: ["data_tests", "inference_tests", "test_aux", "test_text", "test_tts", "test_tts2", "test_vocoder", "test_xtts", "test_zoo0", "test_zoo1", "test_zoo2"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'pip'
cache-dependency-path: 'requirements*'
- name: check OS
run: cat /etc/os-release
- name: set ENV
run: export TRAINER_TELEMETRY=0
version: "0.4.27"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install Espeak
if: contains(fromJSON('["inference_tests", "test_text", "test_tts", "test_tts2", "test_xtts", "test_zoo0", "test_zoo1", "test_zoo2"]'), matrix.subset)
run: |
Expand All @@ -37,21 +34,17 @@ jobs:
sudo apt-get update
sudo apt-get install -y --no-install-recommends git make gcc
make system-deps
- name: Install/upgrade Python setup deps
run: python3 -m pip install --upgrade pip setuptools wheel uv
- name: Replace scarf urls
if: contains(fromJSON('["data_tests", "inference_tests", "test_aux", "test_tts", "test_tts2", "test_xtts", "test_zoo0", "test_zoo1", "test_zoo2"]'), matrix.subset)
run: |
sed -i 's/https:\/\/coqui.gateway.scarf.sh\//https:\/\/github.com\/coqui-ai\/TTS\/releases\/download\//g' TTS/.models.json
- name: Install TTS
- name: Unit tests
run: |
resolution=highest
if [ "${{ matrix.python-version }}" == "3.9" ]; then
resolution=lowest-direct
fi
python3 -m uv pip install --resolution=$resolution --system "coqui-tts[dev,server,languages] @ ."
- name: Unit tests
run: make ${{ matrix.subset }}
uv run --resolution=$resolution --extra server --extra languages make ${{ matrix.subset }}
- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
Expand All @@ -65,18 +58,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: "3.12"
version: "0.4.27"
- uses: actions/download-artifact@v4
with:
pattern: coverage-data-*
merge-multiple: true
- name: Combine coverage
run: |
python -Im pip install --upgrade coverage[toml]

python -Im coverage combine
python -Im coverage html --skip-covered --skip-empty

python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
uv python install
uvx coverage combine
uvx coverage html --skip-covered --skip-empty
uvx coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
uv.lock

WadaSNR/
.idea/
*.pyc
Expand Down
11 changes: 2 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand All @@ -11,14 +11,7 @@ repos:
- id: black
language_version: python3
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
rev: v0.7.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: local
hooks:
- id: generate_requirements.py
name: generate_requirements.py
language: system
entry: python scripts/generate_requirements.py
files: "pyproject.toml|requirements.*\\.txt|tools/generate_requirements.py"
53 changes: 32 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,37 @@ If you have a new feature, a model to implement, or a bug to squash, go ahead an
Please use the following steps to send a ✨**PR**✨.
Let us know if you encounter a problem along the way.

The following steps are tested on an Ubuntu system.
The following steps are tested on an Ubuntu system and require
[uv](https://docs.astral.sh/uv/) for virtual environment management. Choose your
preferred [installation
method](https://docs.astral.sh/uv/getting-started/installation/), e.g. the
standalone installer:

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

1. Fork 🐸TTS[https://github.com/idiap/coqui-ai-TTS] by clicking the fork button at the top right corner of the project page.

2. Clone 🐸TTS and add the main repo as a new remote named ```upstream```.

```bash
$ git clone git@github.com:<your Github name>/coqui-ai-TTS.git
$ cd coqui-ai-TTS
$ git remote add upstream https://github.com/idiap/coqui-ai-TTS.git
git clone git@github.com:<your Github name>/coqui-ai-TTS.git
cd coqui-ai-TTS
git remote add upstream https://github.com/idiap/coqui-ai-TTS.git
```

3. Install 🐸TTS for development.

```bash
$ make system-deps # intended to be used on Ubuntu (Debian). Let us know if you have a different OS.
$ make install_dev
make system-deps # intended to be used on Ubuntu (Debian). Let us know if you have a different OS.
make install_dev
```

4. Create a new branch with an informative name for your goal.

```bash
$ git checkout -b an_informative_name_for_my_branch
git checkout -b an_informative_name_for_my_branch
```

5. Implement your changes on your new branch.
Expand All @@ -75,47 +83,50 @@ The following steps are tested on an Ubuntu system.

7. Add your tests to our test suite under ```tests``` folder. It is important to show that your code works, edge cases are considered, and inform others about the intended use.

8. Run the tests to see how your updates work with the rest of the project. You can repeat this step multiple times as you implement your changes to make sure you are on the right direction.
8. Run the tests to see how your updates work with the rest of the project. You
can repeat this step multiple times as you implement your changes to make
sure you are on the right direction. **NB: running all tests takes a long time,
it is better to leave this to the CI.**

```bash
$ make test # stop at the first error
$ make test_all # run all the tests, report all the errors
uv run make test # stop at the first error
uv run make test_all # run all the tests, report all the errors
```

9. Format your code. We use ```black``` for code formatting.

```bash
$ make style
make style
```

10. Run the linter and correct the issues raised. We use ```ruff``` for linting. It helps to enforce a coding standard, offers simple refactoring suggestions.

```bash
$ make lint
make lint
```

11. When things are good, add new files and commit your changes.

```bash
$ git add my_file1.py my_file2.py ...
$ git commit
git add my_file1.py my_file2.py ...
git commit
```

It's a good practice to regularly sync your local copy of the project with the upstream code to keep up with the recent updates.

```bash
$ git fetch upstream
$ git rebase upstream/main
git fetch upstream
git rebase upstream/main
# or for the development version
$ git rebase upstream/dev
git rebase upstream/dev
```

12. Send a PR to ```dev``` branch.

Push your branch to your fork.

```bash
$ git push -u origin an_informative_name_for_my_branch
git push -u origin an_informative_name_for_my_branch
```

Then go to your fork's Github page and click on 'Pull request' to send your ✨**PR**✨.
Expand All @@ -137,9 +148,9 @@ If you prefer working within a Docker container as your development environment,
2. Clone 🐸TTS and add the main repo as a new remote named ```upsteam```.

```bash
$ git clone git@github.com:<your Github name>/coqui-ai-TTS.git
$ cd coqui-ai-TTS
$ git remote add upstream https://github.com/idiap/coqui-ai-TTS.git
git clone git@github.com:<your Github name>/coqui-ai-TTS.git
cd coqui-ai-TTS
git remote add upstream https://github.com/idiap/coqui-ai-TTS.git
```

3. Build the Docker Image as your development environment (it installs all of the dependencies for you):
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN rm -rf /root/.cache/pip
WORKDIR /root
COPY . /root

RUN make install
RUN pip3 install -e .[all]

ENTRYPOINT ["tts"]
CMD ["--help"]
17 changes: 7 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.DEFAULT_GOAL := help
.PHONY: test system-deps dev-deps style lint install install_dev help docs
.PHONY: test system-deps style lint install install_dev help docs

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Expand Down Expand Up @@ -50,27 +50,24 @@ test_failed: ## only run tests failed the last time.
coverage run -m nose2 -F -v -B tests

style: ## update code style.
black ${target_dirs}
uv run --only-dev black ${target_dirs}

lint: ## run linters.
ruff check ${target_dirs}
black ${target_dirs} --check
uv run --only-dev ruff check ${target_dirs}
uv run --only-dev black ${target_dirs} --check

system-deps: ## install linux system deps
sudo apt-get install -y libsndfile1-dev

dev-deps: ## install development deps
pip install -r requirements.dev.txt

build-docs: ## build the docs
cd docs && make clean && make build

install: ## install 🐸 TTS
pip install -e .[all]
uv sync --all-extras

install_dev: ## install 🐸 TTS for development.
pip install -e .[all,dev]
pre-commit install
uv sync --all-extras
uv run pre-commit install

docs: ## build the docs
$(MAKE) -C docs clean && $(MAKE) -C docs html
28 changes: 9 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@

## 🐸Coqui TTS News
- 📣 Fork of the [original, unmaintained repository](https://github.com/coqui-ai/TTS). New PyPI package: [coqui-tts](https://pypi.org/project/coqui-tts)
- 📣 Prebuilt wheels are now also published for Mac and Windows (in addition to Linux as before) for easier installation across platforms.
- 📣 ⓍTTSv2 is here with 16 languages and better performance across the board.
- 📣 ⓍTTS fine-tuning code is out. Check the [example recipes](https://github.com/idiap/coqui-ai-TTS/tree/dev/recipes/ljspeech).
- 📣 ⓍTTS can now stream with <200ms latency.
- 📣 ⓍTTS, our production TTS model that can speak 13 languages, is released [Blog Post](https://coqui.ai/blog/tts/open_xtts), [Demo](https://huggingface.co/spaces/coqui/xtts), [Docs](https://coqui-tts.readthedocs.io/en/latest/models/xtts.html)
- 📣 [🐶Bark](https://github.com/suno-ai/bark) is now available for inference with unconstrained voice cloning. [Docs](https://coqui-tts.readthedocs.io/en/latest/models/bark.html)
- 📣 You can use [~1100 Fairseq models](https://github.com/facebookresearch/fairseq/tree/main/examples/mms) with 🐸TTS.
- 📣 🐸TTS now supports 🐢Tortoise with faster inference. [Docs](https://coqui-tts.readthedocs.io/en/latest/models/tortoise.html)

<div align="center">
<img src="https://static.scarf.sh/a.png?x-pxid=cf317fe7-2188-4721-bc01-124bb5d5dbb2" />

## <img src="https://raw.githubusercontent.com/idiap/coqui-ai-TTS/main/images/coqui-log-green-TTS.png" height="56"/>

Expand All @@ -27,7 +24,6 @@ ______________________________________________________________________
[![Discord](https://img.shields.io/discord/1037326658807533628?color=%239B59B6&label=chat%20on%20discord)](https://discord.gg/5eXr5seRrv)
[![License](<https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg>)](https://opensource.org/licenses/MPL-2.0)
[![PyPI version](https://badge.fury.io/py/coqui-tts.svg)](https://badge.fury.io/py/coqui-tts)
[![Covenant](https://camo.githubusercontent.com/7d620efaa3eac1c5b060ece5d6aacfcc8b81a74a04d05cd0398689c01c4463bb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6e7472696275746f72253230436f76656e616e742d76322e3025323061646f707465642d6666363962342e737667)](https://github.com/idiap/coqui-ai-TTS/blob/main/CODE_OF_CONDUCT.md)
[![Downloads](https://pepy.tech/badge/coqui-tts)](https://pepy.tech/project/coqui-tts)
[![DOI](https://zenodo.org/badge/265612440.svg)](https://zenodo.org/badge/latestdoi/265612440)

Expand All @@ -43,12 +39,11 @@ ______________________________________________________________________
## 💬 Where to ask questions
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.

| Type | Platforms |
| ------------------------------- | --------------------------------------- |
| 🚨 **Bug Reports** | [GitHub Issue Tracker] |
| 🎁 **Feature Requests & Ideas** | [GitHub Issue Tracker] |
| 👩‍💻 **Usage Questions** | [GitHub Discussions] |
| 🗯 **General Discussion** | [GitHub Discussions] or [Discord] |
| Type | Platforms |
| -------------------------------------------- | ----------------------------------- |
| 🚨 **Bug Reports, Feature Requests & Ideas** | [GitHub Issue Tracker] |
| 👩‍💻 **Usage Questions** | [GitHub Discussions] |
| 🗯 **General Discussion** | [GitHub Discussions] or [Discord] |

[github issue tracker]: https://github.com/idiap/coqui-ai-TTS/issues
[github discussions]: https://github.com/idiap/coqui-ai-TTS/discussions
Expand All @@ -66,15 +61,10 @@ repository are also still a useful source of information.
| 💼 **Documentation** | [ReadTheDocs](https://coqui-tts.readthedocs.io/en/latest/)
| 💾 **Installation** | [TTS/README.md](https://github.com/idiap/coqui-ai-TTS/tree/dev#installation)|
| 👩‍💻 **Contributing** | [CONTRIBUTING.md](https://github.com/idiap/coqui-ai-TTS/blob/main/CONTRIBUTING.md)|
| 📌 **Road Map** | [Main Development Plans](https://github.com/coqui-ai/TTS/issues/378)
| 🚀 **Released Models** | [Standard models](https://github.com/idiap/coqui-ai-TTS/blob/dev/TTS/.models.json) and [Fairseq models in ~1100 languages](https://github.com/idiap/coqui-ai-TTS#example-text-to-speech-using-fairseq-models-in-1100-languages-)|
| 📰 **Papers** | [TTS Papers](https://github.com/erogol/TTS-papers)|

## Features
- High-performance Deep Learning models for Text2Speech tasks.
- Text2Spec models (Tacotron, Tacotron2, Glow-TTS, SpeedySpeech).
- Speaker Encoder to compute speaker embeddings efficiently.
- Vocoder models (MelGAN, Multiband-MelGAN, GAN-TTS, ParallelWaveGAN, WaveGrad, WaveRNN)
- High-performance Deep Learning models for Text2Speech tasks. See lists of models below.
- Fast and efficient model training.
- Detailed training logs on the terminal and Tensorboard.
- Support for Multi-speaker TTS.
Expand Down Expand Up @@ -180,8 +170,8 @@ pip install -e .[server,ja]
If you are on Ubuntu (Debian), you can also run following commands for installation.

```bash
$ make system-deps # intended to be used on Ubuntu (Debian). Let us know if you have a different OS.
$ make install
make system-deps # intended to be used on Ubuntu (Debian). Let us know if you have a different OS.
make install
```

If you are on Windows, 👑@GuyPaddock wrote installation instructions
Expand Down
Loading
Loading