Skip to content

Commit

Permalink
Merge branch 'idiap:dev' into Viet-Support
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewThomasson authored Mar 8, 2025
2 parents bf0082c + 4c593c6 commit 52cb741
Show file tree
Hide file tree
Showing 319 changed files with 6,193 additions and 9,285 deletions.
5 changes: 3 additions & 2 deletions .github/actions/setup-uv/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ runs:
using: 'composite'
steps:
- name: Install uv
uses: astral-sh/setup-uv@v3
uses: astral-sh/setup-uv@v5
with:
version: "0.5.1"
version: "0.5.17"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
python-version: ${{ matrix.python-version }}
82 changes: 0 additions & 82 deletions .github/workflows/integration-tests.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
path: dist
pattern: build
path: "dist/"
name: build
- run: |
ls -lh dist/
- name: Publish package distributions to PyPI
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/style_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,9 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v4
- name: Setup uv
uses: ./.github/actions/setup-uv
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Lint check
run: make lint
95 changes: 86 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: unit
name: test

on:
push:
Expand All @@ -17,27 +17,24 @@ on:
required: false
default: "main"
jobs:
test:
unit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.9, "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
subset: ["data_tests", "inference_tests", "test_aux", "test_text"]
steps:
- uses: actions/checkout@v4
- name: Setup uv
uses: ./.github/actions/setup-uv
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install Espeak
if: contains(fromJSON('["inference_tests", "test_text"]'), matrix.subset)
run: |
sudo apt-get update
sudo apt-get install espeak espeak-ng
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends git make gcc
make system-deps
- name: Install custom Trainer and/or Coqpit if requested
Expand All @@ -51,7 +48,7 @@ jobs:
- name: Unit tests
run: |
resolution=highest
if [ "${{ matrix.python-version }}" == "3.9" ]; then
if [ "${{ matrix.python-version }}" == "3.10" ]; then
resolution=lowest-direct
fi
uv run --resolution=$resolution --extra server --extra languages make ${{ matrix.subset }}
Expand All @@ -61,10 +58,90 @@ jobs:
include-hidden-files: true
name: coverage-data-${{ matrix.subset }}-${{ matrix.python-version }}
path: .coverage.*
if-no-files-found: ignore
integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12"]
shard: [0, 1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- name: Setup uv
uses: ./.github/actions/setup-uv
- name: Install Espeak
run: |
sudo apt-get update
sudo apt-get install espeak espeak-ng
- name: Install dependencies
run: |
sudo apt-get install -y --no-install-recommends git make gcc
make system-deps
- name: Install custom Trainer and/or Coqpit if requested
run: |
if [[ -n "${{ github.event.inputs.trainer_branch }}" ]]; then
uv add git+https://github.com/idiap/coqui-ai-Trainer --branch ${{ github.event.inputs.trainer_branch }}
fi
if [[ -n "${{ github.event.inputs.coqpit_branch }}" ]]; then
uv add git+https://github.com/idiap/coqui-ai-coqpit --branch ${{ github.event.inputs.coqpit_branch }}
fi
- name: Integration tests for shard ${{ matrix.shard }}
run: |
uv run pytest tests/integration --collect-only --quiet | grep "::" > integration_tests.txt
total_shards=5
shard_tests=$(awk "NR % $total_shards == ${{ matrix.shard }}" integration_tests.txt)
resolution=highest
if [ "${{ matrix.python-version }}" == "3.10" ]; then
resolution=lowest-direct
fi
uv run --resolution=$resolution --extra languages coverage run -m pytest -x -v --durations=0 $shard_tests
- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: coverage-data-integration-${{ matrix.shard }}-${{ matrix.python-version }}
path: .coverage.*
zoo:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
partition: ["0", "1", "2"]
steps:
- uses: actions/checkout@v4
- name: Setup uv
uses: ./.github/actions/setup-uv
- name: Install Espeak
run: |
sudo apt-get update
sudo apt-get install espeak espeak-ng
- name: Install dependencies
run: |
sudo apt-get install -y --no-install-recommends git make gcc
make system-deps
- name: Install custom Trainer and/or Coqpit if requested
run: |
if [[ -n "${{ github.event.inputs.trainer_branch }}" ]]; then
uv add git+https://github.com/idiap/coqui-ai-Trainer --branch ${{ github.event.inputs.trainer_branch }}
fi
if [[ -n "${{ github.event.inputs.coqpit_branch }}" ]]; then
uv add git+https://github.com/idiap/coqui-ai-coqpit --branch ${{ github.event.inputs.coqpit_branch }}
fi
- name: Zoo tests
run: uv run --extra server --extra languages make test_zoo
env:
NUM_PARTITIONS: 3
TEST_PARTITION: ${{ matrix.partition }}
- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: coverage-data-zoo-${{ matrix.partition }}
path: .coverage.*
coverage:
if: always()
needs: test
needs: [unit, integration, zoo]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
10 changes: 4 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v5.0.0
hooks:
- id: check-json
files: "TTS/.models.json"
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: "https://github.com/psf/black"
rev: 24.2.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
rev: v0.9.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
26 changes: 11 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,25 @@ You can contribute not only with code but with bug reports, comments, questions,

If you like to contribute code, squash a bug but if you don't know where to start, here are some pointers.

- [Development Road Map](https://github.com/coqui-ai/TTS/issues/378)

You can pick something out of our road map. We keep the progess of the project in this simple issue thread. It has new model proposals or developmental updates etc.

- [Github Issues Tracker](https://github.com/idiap/coqui-ai-TTS/issues)

This is a place to find feature requests, bugs.

Issues with the ```good first issue``` tag are good place for beginners to take on.

-**PR**[pages](https://github.com/idiap/coqui-ai-TTS/pulls) with the ```🚀new version``` tag.

We list all the target improvements for the next version. You can pick one of them and start contributing.
Issues with the ```good first issue``` tag are good place for beginners to
take on. Issues tagged with `help wanted` are suited for more experienced
outside contributors.

- Also feel free to suggest new features, ideas and models. We're always open for new things.

## Call for sharing language models
## Call for sharing pretrained models
If possible, please consider sharing your pre-trained models in any language (if the licences allow for you to do so). We will include them in our model catalogue for public use and give the proper attribution, whether it be your name, company, website or any other source specified.

This model can be shared in two ways:
1. Share the model files with us and we serve them with the next 🐸 TTS release.
2. Upload your models on GDrive and share the link.

Models are served under `.models.json` file and any model is available under TTS CLI or Server end points.
Models are served under `.models.json` file and any model is available under TTS
CLI and Python API end points.

Either way you choose, please make sure you send the models [here](https://github.com/coqui-ai/TTS/discussions/930).

Expand Down Expand Up @@ -93,7 +88,7 @@ curl -LsSf https://astral.sh/uv/install.sh | sh
uv run make test_all # run all the tests, report all the errors
```

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

```bash
make style
Expand Down Expand Up @@ -135,17 +130,18 @@ curl -LsSf https://astral.sh/uv/install.sh | sh
13. Let's discuss until it is perfect. 💪

We might ask you for certain changes that would appear in the ✨**PR**'s page under 🐸TTS[https://github.com/idiap/coqui-ai-TTS/pulls].
We might ask you for certain changes that would appear in the
[Github ✨**PR**'s page](https://github.com/idiap/coqui-ai-TTS/pulls).
14. Once things look perfect, We merge it to the ```dev``` branch and make it ready for the next version.
## Development in Docker container
If you prefer working within a Docker container as your development environment, you can do the following:
1. Fork 🐸TTS[https://github.com/idiap/coqui-ai-TTS] by clicking the fork button at the top right corner of the project page.
1. Fork the 🐸TTS [Github repository](https://github.com/idiap/coqui-ai-TTS) by clicking the fork button at the top right corner of the page.
2. Clone 🐸TTS and add the main repo as a new remote named ```upsteam```.
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
Expand Down
Loading

0 comments on commit 52cb741

Please sign in to comment.