Skip to content

Commit

Permalink
🐍 Python 3.10.x support and drop Python 3.6 support (coqui-ai#1565)
Browse files Browse the repository at this point in the history
* Update requirements

* Update CI for p3.10

* Update numpy requirement

* Drop 🐍p3.6 support

Numpy also dropped support for p3.6

* Bind cython v0.29.28

* Bind pyworld to v0.2.10

> 0.2.10 is not p3.10.x compatible

* Update Dockerfile
  • Loading branch information
erogol authored May 12, 2022
1 parent a97eed6 commit 4857967
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/aux_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, "3.10"]
experimental: [false]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/data_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, "3.10"]
experimental: [false]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/inference_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, "3.10"]
experimental: [false]
steps:
- uses: actions/checkout@v2
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand All @@ -62,10 +62,6 @@ jobs:
with:
name: "sdist"
path: "dist/"
- uses: actions/download-artifact@v2
with:
name: "wheel-3.6"
path: "dist/"
- uses: actions/download-artifact@v2
with:
name: "wheel-3.7"
Expand All @@ -78,6 +74,10 @@ jobs:
with:
name: "wheel-3.9"
path: "dist/"
- uses: actions/download-artifact@v2
with:
name: "wheel-3.10"
path: "dist/"
- run: |
ls -lh dist/
- name: Setup PyPI config
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/text_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, "3.10"]
experimental: [false]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tts_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, "3.10"]
experimental: [false]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vocoder_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, "3.10"]
experimental: [false]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zoo_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, "3.10"]
experimental: [false]
steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM nvcr.io/nvidia/pytorch:22.03-py3
RUN apt-get update && apt-get install -y --no-install-recommends espeak && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends espeak espeak-ng && rm -rf /var/lib/apt/lists/*
RUN pip install llvmlite --ignore-installed
WORKDIR /root
COPY requirements.txt /root
COPY requirements.dev.txt /root
COPY requirements.notebooks.txt /root
RUN pip install -r <(cat requirements.txt requirements.dev.txt requirements.notebooks.txt)
RUN ["/bin/bash", "-c", "pip install -r <(cat requirements.txt requirements.dev.txt requirements.notebooks.txt)"]
COPY . /root
RUN make install
ENTRYPOINT ["tts"]
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@ help:
target_dirs := tests TTS notebooks recipes

test_all: ## run tests and don't stop on an error.
nosetests --with-cov -cov --cover-erase --cover-package TTS tests --nologcapture --with-id
nose2 --with-coverage --coverage TTS tests
./run_bash_tests.sh

test: ## run tests.
nosetests -x --with-cov -cov --cover-erase --cover-package TTS tests --nologcapture --with-id
nose2 -F -v -B --with-coverage --coverage TTS tests

test_vocoder: ## run vocoder tests.
nosetests tests.vocoder_tests -x --with-cov -cov --cover-erase --cover-package TTS tests.vocoder_tests --nologcapture --with-id
nose2 -F -v -B --with-coverage --coverage TTS tests.vocoder_tests

test_tts: ## run tts tests.
nosetests tests.tts_tests -x --with-cov -cov --cover-erase --cover-package TTS tests.tts_tests --nologcapture --with-id
nose2 -F -v -B --with-coverage --coverage TTS tests.tts_tests

test_aux: ## run aux tests.
nosetests tests.aux_tests -x --with-cov -cov --cover-erase --cover-package TTS tests.aux_tests --nologcapture --with-id
nose2 -F -v -B --with-coverage --coverage TTS tests.aux_tests
./run_bash_tests.sh

test_zoo: ## run zoo tests.
nosetests tests.zoo_tests -x --with-cov -cov --cover-erase --cover-package TTS tests.zoo_tests --nologcapture --with-id
nose2 -F -v -B --with-coverage --coverage TTS tests.zoo_tests

inference_tests: ## run inference tests.
nosetests tests.inference_tests -x --with-cov -cov --cover-erase --cover-package TTS tests.inference_tests --nologcapture --with-id
nose2 -F -v -B --with-coverage --coverage TTS tests.inference_tests

data_tests: ## run data tests.
nosetests tests.data_tests -x --with-cov -cov --cover-erase --cover-package TTS tests.data_tests --nologcapture --with-id
nose2 -F -v -B --with-coverage --coverage TTS tests.data_tests

test_text: ## run text tests.
nosetests tests.text_tests -x --with-cov -cov --cover-erase --cover-package TTS tests.text_tests --nologcapture --with-id
nose2 -F -v -B --with-coverage --coverage TTS tests.text_tests

test_failed: ## only run tests failed the last time.
nosetests -x --with-cov -cov --cover-erase --cover-package TTS tests --nologcapture --failed
nose2 -F -v -B --with-coverage --coverage TTS tests

style: ## update code style.
black ${target_dirs}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Underlined "TTS*" and "Judy*" are 🐸TTS models
You can also help us implement more models.

## Install TTS
🐸TTS is tested on Ubuntu 18.04 with **python >= 3.6, < 3.9**.
🐸TTS is tested on Ubuntu 18.04 with **python >= 3.7, < 3.11.**.

If you are only interested in [synthesizing speech](https://tts.readthedocs.io/en/latest/inference.html) with the released 🐸TTS models, installing from PyPI is the easiest option.

Expand Down
6 changes: 0 additions & 6 deletions TTS/server/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<!-- ## TTS example web-server
You'll need a model package (Zip file, includes TTS Python wheel, model files, server configuration, and optional nginx/uwsgi configs). Publicly available models are listed [here](https://github.com/mozilla/TTS/wiki/Released-Models#simple-packaging---self-contained-package-that-runs-an-http-api-for-a-pre-trained-tts-model).
Instructions below are based on a Ubuntu 18.04 machine, but it should be simple to adapt the package names to other distros if needed. Python 3.6 is recommended, as some of the dependencies' versions predate Python 3.7 and will force building from source, which requires extra dependencies and is not guaranteed to work. -->

# :frog: TTS demo server
Before you use the server, make sure you [install](https://github.com/coqui-ai/TTS/tree/dev#install-tts)) :frog: TTS properly. Then, you can follow the steps below.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation

🐸TTS supports python >=3.6 <=3.9 and tested on Ubuntu 18.10, 19.10, 20.10.
🐸TTS supports python >=3.7 <3.11.0 and tested on Ubuntu 18.10, 19.10, 20.10.

## Using `pip`

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools", "wheel", "Cython", "numpy==1.19.5"]
requires = ["setuptools", "wheel", "cython==0.29.28", "numpy==1.21.6"]

[flake8]
max-line-length=120
Expand Down
2 changes: 1 addition & 1 deletion requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
black
coverage
isort
nose
nose2
pylint==2.10.2
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# core deps
numpy==1.19.5
cython
numpy==1.21.6
cython==0.29.28
scipy>=1.4.0
torch>=1.7
torchaudio
soundfile
librosa==0.8.0
numba==0.53
numba==0.55.1
inflect
tqdm
anyascii
Expand All @@ -22,7 +22,7 @@ pandas
# deps for training
matplotlib
tensorboardX
pyworld
pyworld==0.2.10 # > 0.2.10 is not p3.10.x compatible
# coqui stack
trainer
# config management
Expand All @@ -31,7 +31,7 @@ coqpit>=0.0.16
jieba
pypinyin
# japanese g2p deps
mecab-python3==1.0.3
mecab-python3==1.0.5
unidic-lite==1.0.8
# gruut+supported langs
gruut[cs,de,es,fr,it,nl,pt,ru,sv]==2.2.3
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
from Cython.Build import cythonize
from setuptools import Extension, find_packages, setup

if LooseVersion(sys.version) < LooseVersion("3.6") or LooseVersion(sys.version) > LooseVersion("3.10"):
raise RuntimeError("TTS requires python >= 3.6 and <=3.10 " "but your Python version is {}".format(sys.version))
if LooseVersion(sys.version) < LooseVersion("3.7") or LooseVersion(sys.version) >= LooseVersion("3.11"):
raise RuntimeError("TTS requires python >= 3.7 and < 3.11 " "but your Python version is {}".format(sys.version))


cwd = os.path.dirname(os.path.abspath(__file__))
Expand Down Expand Up @@ -113,15 +113,15 @@ def pip_install(package_name):
"dev": requirements_dev,
"notebooks": requirements_notebooks,
},
python_requires=">=3.6.0, <3.10",
python_requires=">=3.7.0, <3.11",
entry_points={"console_scripts": ["tts=TTS.bin.synthesize:main", "tts-server = TTS.server.server:main"]},
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
Expand Down

0 comments on commit 4857967

Please sign in to comment.