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.26.0 #338

Merged
merged 32 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
55eeaf2
build: update dev dependencies
eginhard Jan 10, 2025
38e3c94
build: drop python 3.9 support
eginhard Jan 10, 2025
2e4fbb6
refactor: enable ruff rule G004
eginhard Jan 10, 2025
f67f0a1
refactor: apply safe automatic ruff lint fixes
eginhard Jan 10, 2025
4b23fb2
refactor: apply unsafe automatic ruff lint fixes
eginhard Jan 10, 2025
5a4b8b5
style: run ruff format
eginhard Jan 11, 2025
ce9f1bf
build: switch black to ruff formatter
eginhard Jan 11, 2025
008912c
fix(tortoise): do not set device, which is handled in BaseTrainerModel
eginhard Jan 16, 2025
420a02f
Merge pull request #255 from idiap/drop-py39
eginhard Jan 16, 2025
fd455a3
docs(server): clean up README (#272)
junland Jan 27, 2025
11b79f6
fix(configs): update config field types
eginhard Jan 11, 2025
1d55915
build: update coqpit-config to 0.2.0
eginhard Jan 14, 2025
b3a0315
test: run tts trainings tests from python
eginhard Jan 9, 2025
8bd10c8
test: parametrize multi-speaker tests
eginhard Jan 17, 2025
500916f
refactor(encoder): simplify code and run test from python
eginhard Jan 27, 2025
be83166
test: move integration tests into separate folder
eginhard Jan 29, 2025
1860ae5
fix(vocoder): add missing rank argument
eginhard Feb 4, 2025
a2fb366
Merge pull request #276 from idiap/pytest
eginhard Feb 4, 2025
1641257
fix: notify users when wrong coqpit package is installed (#294)
eginhard Feb 10, 2025
382b418
feat(server): add speaker_wav parameter for voice cloning (#295)
shavit Feb 21, 2025
b20533e
feat(api): support setting speed (#316)
eginhard Feb 25, 2025
09ade6a
refactor(xtts): update parameters for transformers>=4.47
JohnnyStreet Nov 10, 2024
d8f6afe
refactor(transformers): LogitsWarper -> LogitsProcessor
eginhard Feb 26, 2025
4e48f3d
build: update transformers version
eginhard Feb 26, 2025
4c593c6
Merge pull request #319 from idiap/transformers
eginhard Feb 26, 2025
6eac527
ci: add paths-ignore in workflows
DrewThomasson Mar 8, 2025
9038c63
chore: bump version to 0.26.0
eginhard Mar 10, 2025
8b75a78
feat: add new persian-tts-female-vits model
DrewThomasson Mar 8, 2025
8776132
fix(api): if there are only 2 model urls, assume they are model and c…
eginhard Mar 10, 2025
6d78df9
fix(xtts): overwrite model_args in GPTTrainerConfig (#270)
eginhard Mar 10, 2025
e2defc1
Merge pull request #332 from DrewThomasson/Persian-patch-1
eginhard Mar 10, 2025
fb71e2a
Merge pull request #334 from DrewThomasson/Workflow-patch-1
eginhard Mar 10, 2025
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
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@v4
uses: astral-sh/setup-uv@v5
with:
version: "0.5.4"
version: "0.5.17"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
python-version: ${{ matrix.python-version }}
17 changes: 17 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
name: "Docker build and push"
on:
pull_request:
paths-ignore:
- '.gitignore'
- 'CITATION.cff'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'LICENSE.txt'
- 'README.md'
- 'images/**'
push:
branches:
- main
- dev
tags:
- v*
paths-ignore:
- '.gitignore'
- 'CITATION.cff'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'LICENSE.txt'
- 'README.md'
- 'images/**'

jobs:
docker-build:
name: "Build and push Docker image"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
types: [published]
defaults:
run:
shell:
bash
shell: bash

jobs:
build:
runs-on: ubuntu-latest
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/style_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,31 @@ on:
push:
branches:
- main
paths-ignore:
- '.gitignore'
- 'CITATION.cff'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'LICENSE.txt'
- 'README.md'
- 'images/**'
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- '.gitignore'
- 'CITATION.cff'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'LICENSE.txt'
- 'README.md'
- 'images/**'

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
54 changes: 36 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,24 @@ on:
push:
branches:
- main
paths-ignore:
- '.gitignore'
- 'CITATION.cff'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'LICENSE.txt'
- 'README.md'
- 'images/**'
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- '.gitignore'
- 'CITATION.cff'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'LICENSE.txt'
- 'README.md'
- 'images/**'
workflow_dispatch:
inputs:
trainer_branch:
Expand All @@ -16,20 +32,27 @@ on:
description: "Branch of Coqpit to test"
required: false
default: "main"
paths-ignore:
- '.gitignore'
- 'CITATION.cff'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'LICENSE.txt'
- 'README.md'
- 'images/**'

jobs:
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: |
Expand All @@ -50,7 +73,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 @@ -60,22 +83,18 @@ 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.9", "3.12"]
subset: ["test_tts", "test_tts2", "test_vocoder", "test_xtts"]
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: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install Espeak
if: contains(fromJSON('["test_tts", "test_tts2", "test_xtts"]'), matrix.subset)
run: |
sudo apt-get update
sudo apt-get install espeak espeak-ng
Expand All @@ -91,20 +110,22 @@ jobs:
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
- 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.9" ]; then
if [ "${{ matrix.python-version }}" == "3.10" ]; then
resolution=lowest-direct
fi
uv run --resolution=$resolution --extra server --extra languages make ${{ matrix.subset }}
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-${{ matrix.subset }}-${{ matrix.python-version }}
name: coverage-data-integration-${{ matrix.shard }}-${{ matrix.python-version }}
path: .coverage.*
if-no-files-found: ignore
zoo:
runs-on: ubuntu-latest
strategy:
Expand All @@ -116,8 +137,6 @@ jobs:
- 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
run: |
sudo apt-get update
Expand Down Expand Up @@ -145,7 +164,6 @@ jobs:
include-hidden-files: true
name: coverage-data-zoo-${{ matrix.partition }}
path: .coverage.*
if-no-files-found: ignore
coverage:
if: always()
needs: [unit, integration, zoo]
Expand Down
8 changes: 2 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@ repos:
- 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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,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
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ test_vocoder: ## run vocoder tests.
test_tts: ## run tts tests.
coverage run -m pytest -x -v --durations=0 tests/tts_tests

test_tts2: ## run tts tests.
coverage run -m pytest -x -v --durations=0 tests/tts_tests2

test_xtts:
coverage run -m pytest -x -v --durations=0 tests/xtts_tests

test_aux: ## run aux tests.
coverage run -m pytest -x -v --durations=0 tests/aux_tests

Expand All @@ -43,11 +37,11 @@ test_failed: ## only run tests failed the last time.
coverage run -m pytest -x -v --last-failed tests

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

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

system-deps: ## install linux system deps
sudo apt-get install -y libsndfile1-dev
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ You can also help us implement more models.
<!-- start installation -->
## Installation

🐸TTS is tested on Ubuntu 24.04 with **python >= 3.9, < 3.13**, but should also
🐸TTS is tested on Ubuntu 24.04 with **python >= 3.10, < 3.13**, but should also
work on Mac and Windows.

If you are only interested in [synthesizing speech](https://coqui-tts.readthedocs.io/en/latest/inference.html) with the pretrained 🐸TTS models, installing from PyPI is the easiest option.
Expand Down
11 changes: 11 additions & 0 deletions TTS/.models.json
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,17 @@
"description": "persian-tts-female-glow_tts model for text to speech purposes. Single-speaker female voice Trained on persian-tts-dataset-famale. \nThis model has no compatible vocoder thus the output quality is not very good. \nDataset: https://www.kaggle.com/datasets/magnoliasis/persian-tts-dataset-famale.",
"author": "@karim23657",
"license": "CC-BY-4.0"
},
"vits-female": {
"hf_url": [
"https://huggingface.co/Kamtera/persian-tts-female-vits/resolve/main/best_model_30824.pth",
"https://huggingface.co/Kamtera/persian-tts-female-vits/resolve/main/config.json"
],
"default_vocoder": null,
"commit": null,
"description": "persian-tts-female-vits model for text to speech purposes. Single-speaker female voice trained on persian-tts-dataset-female.\nDataset: https://www.kaggle.com/datasets/magnoliasis/persian-tts-dataset-famale.",
"author": "@karim23657",
"license": "openrail"
}
}
},
Expand Down
9 changes: 9 additions & 0 deletions TTS/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@

__version__ = importlib.metadata.version("coqui-tts")

if "coqpit" in importlib.metadata.packages_distributions().get("coqpit", []):
msg = (
"coqui-tts switched to a forked version of Coqpit, but you still have the original "
"package installed. Run the following to avoid conflicts:\n"
" pip uninstall coqpit\n"
" pip install coqpit-config"
)
raise ImportError(msg)


if is_pytorch_at_least_2_4():
import _codecs
Expand Down
Loading
Loading