From 4857967063924138d5d358ae42b223ee7700d57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Thu, 12 May 2022 15:50:25 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=8D=20Python=203.10.x=20support=20and?= =?UTF-8?q?=20drop=20Python=203.6=20support=20(#1565)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- .github/workflows/aux_tests.yml | 2 +- .github/workflows/data_tests.yml | 2 +- .github/workflows/inference_tests.yml | 2 +- .github/workflows/pypi-release.yml | 10 +++++----- .github/workflows/text_tests.yml | 2 +- .github/workflows/tts_tests.yml | 2 +- .github/workflows/vocoder_tests.yml | 2 +- .github/workflows/zoo_tests.yml | 2 +- Dockerfile | 5 +++-- Makefile | 20 ++++++++++---------- README.md | 2 +- TTS/server/README.md | 6 ------ docs/source/installation.md | 2 +- pyproject.toml | 2 +- requirements.dev.txt | 2 +- requirements.txt | 10 +++++----- setup.py | 8 ++++---- 17 files changed, 38 insertions(+), 43 deletions(-) diff --git a/.github/workflows/aux_tests.yml b/.github/workflows/aux_tests.yml index 59ba572d..d3970742 100644 --- a/.github/workflows/aux_tests.yml +++ b/.github/workflows/aux_tests.yml @@ -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 diff --git a/.github/workflows/data_tests.yml b/.github/workflows/data_tests.yml index 296aa570..cb94ef7f 100644 --- a/.github/workflows/data_tests.yml +++ b/.github/workflows/data_tests.yml @@ -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 diff --git a/.github/workflows/inference_tests.yml b/.github/workflows/inference_tests.yml index 3f08b904..e4832db7 100644 --- a/.github/workflows/inference_tests.yml +++ b/.github/workflows/inference_tests.yml @@ -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 diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 02faa7f6..83797be1 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -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 @@ -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" @@ -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 diff --git a/.github/workflows/text_tests.yml b/.github/workflows/text_tests.yml index 66197e0b..87a0658d 100644 --- a/.github/workflows/text_tests.yml +++ b/.github/workflows/text_tests.yml @@ -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 diff --git a/.github/workflows/tts_tests.yml b/.github/workflows/tts_tests.yml index 0a5891ee..21a5b989 100644 --- a/.github/workflows/tts_tests.yml +++ b/.github/workflows/tts_tests.yml @@ -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 diff --git a/.github/workflows/vocoder_tests.yml b/.github/workflows/vocoder_tests.yml index 24ae9e3f..e1e619b6 100644 --- a/.github/workflows/vocoder_tests.yml +++ b/.github/workflows/vocoder_tests.yml @@ -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 diff --git a/.github/workflows/zoo_tests.yml b/.github/workflows/zoo_tests.yml index 94d54200..10c192e4 100644 --- a/.github/workflows/zoo_tests.yml +++ b/.github/workflows/zoo_tests.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 8dab3b30..3cc41d6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/Makefile b/Makefile index 69f34c79..7adea3a1 100644 --- a/Makefile +++ b/Makefile @@ -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} diff --git a/README.md b/README.md index 97a7cc66..5be1622b 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/TTS/server/README.md b/TTS/server/README.md index 5458e398..270656c4 100644 --- a/TTS/server/README.md +++ b/TTS/server/README.md @@ -1,9 +1,3 @@ - - # :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. diff --git a/docs/source/installation.md b/docs/source/installation.md index 0122271d..c4d05361 100644 --- a/docs/source/installation.md +++ b/docs/source/installation.md @@ -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` diff --git a/pyproject.toml b/pyproject.toml index b775f12a..b790159d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 diff --git a/requirements.dev.txt b/requirements.dev.txt index c995f9e6..8c674727 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -1,5 +1,5 @@ black coverage isort -nose +nose2 pylint==2.10.2 diff --git a/requirements.txt b/requirements.txt index 098f5eee..e6eaf885 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 @@ -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 @@ -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 diff --git a/setup.py b/setup.py index 96173fec..3c860949 100644 --- a/setup.py +++ b/setup.py @@ -31,8 +31,8 @@ import setuptools.command.develop 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__)) @@ -113,15 +113,15 @@ setup( "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",