build: move dependencies into pyproject.toml

This commit is contained in:
Enno Hermann 2024-05-07 14:41:40 +02:00
parent fb92e13ebb
commit 8d2a562c59
8 changed files with 86 additions and 83 deletions

View File

@ -14,8 +14,9 @@ build:
# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt
- path: .
extra_requirements:
- docs
# Build documentation in the docs/ directory with Sphinx
sphinx:

View File

@ -1,8 +1,6 @@
include README.md
include LICENSE.txt
include requirements.*.txt
include *.cff
include requirements.txt
recursive-include TTS *.json
recursive-include TTS *.html
recursive-include TTS *.png

View File

@ -1,5 +1,5 @@
.DEFAULT_GOAL := help
.PHONY: test system-deps dev-deps deps style lint install help docs
.PHONY: test system-deps dev-deps style lint install help docs
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@ -65,9 +65,6 @@ dev-deps: ## install development deps
build-docs: ## build the docs
cd docs && make clean && make build
deps: ## install 🐸 requirements.
pip install -r requirements.txt
install: ## install 🐸 TTS for development.
pip install -e .[all]

View File

@ -41,6 +41,88 @@ classifiers = [
"Topic :: Multimedia",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
# Core
"numpy>=1.24.3",
"cython>=0.29.30",
"scipy>=1.11.2",
"torch>=2.1",
"torchaudio",
"soundfile>=0.12.0",
"librosa>=0.10.1",
"inflect>=5.6.0",
"tqdm>=4.64.1",
"anyascii>=0.3.0",
"pyyaml>=6.0",
"fsspec[http]>=2023.6.0",
"packaging>=23.1",
# Inference
"pysbd>=0.3.4",
# Notebooks
"umap-learn>=0.5.1",
# Training
"matplotlib>=3.7.0",
# Coqui stack
"coqui-tts-trainer>=0.1",
"coqpit>=0.0.16",
# Chinese
"jieba",
"pypinyin",
# Korean
"hangul_romanize",
"jamo",
"g2pkk>=0.1.1",
# Gruut + supported languages
"gruut[de,es,fr]==2.2.3",
# Bangla
"bangla",
"bnnumerizer",
"bnunicodenormalizer",
# Tortoise
"einops>=0.6.0",
"transformers>=4.33.0",
# Bark
"encodec>=0.1.1",
# XTTS
"num2words",
"spacy[ja]>=3"
]
[project.optional-dependencies]
# Development dependencies
dev = [
"black==24.2.0",
"coverage[toml]",
"nose2",
"ruff==0.3.0",
]
# Dependencies for building the documentation
docs = [
"furo",
"myst-parser==2.0.0",
"sphinx==7.2.5",
"sphinx_inline_tabs",
"sphinx_copybutton",
"linkify-it-py",
]
# Only used in notebooks
notebooks = [
"bokeh==1.4.0",
"pandas>=1.4,<2.0",
]
# For running the TTS server
server = ["flask>=2.0.1"]
# Language-specific dependencies, mainly for G2P
# Japanese
ja = [
"mecab-python3",
"unidic-lite==1.0.8",
"cutlet",
]
# Installs all extras (except dev and docs)
all = [
"coqui-tts[notebooks,server,ja]",
]
[project.urls]
Homepage = "https://github.com/idiap/coqui-ai-TTS"

View File

@ -1,5 +0,0 @@
# These cause some compatibility issues on some systems and are not strictly necessary
# japanese g2p deps
mecab-python3
unidic-lite==1.0.8
cutlet

View File

@ -1,2 +0,0 @@
bokeh==1.4.0
pandas>=1.4,<2.0

View File

@ -1,46 +0,0 @@
# core deps
numpy>=1.24.3
cython>=0.29.30
scipy>=1.11.2
torch>=2.1
torchaudio
soundfile>=0.12.0
librosa>=0.10.1
inflect>=5.6.0
tqdm>=4.64.1
anyascii>=0.3.0
pyyaml>=6.0
fsspec[http]>=2023.6.0 # <= 2023.9.1 makes aux tests fail
packaging>=23.1
# deps for inference
pysbd>=0.3.4
# deps for notebooks
umap-learn>=0.5.1
# deps for training
matplotlib>=3.7.0
# coqui stack
coqui-tts-trainer>=0.1
# config management
coqpit>=0.0.16
# chinese g2p deps
jieba
pypinyin
# korean
hangul_romanize
# gruut+supported langs
gruut[de,es,fr]==2.2.3
# deps for korean
jamo
g2pkk>=0.1.1
# deps for bangla
bangla
bnnumerizer
bnunicodenormalizer
#deps for tortoise
einops>=0.6.0
transformers>=4.33.0
#deps for bark
encodec>=0.1.1
# deps for XTTS
num2words
spacy[ja]>=3

View File

@ -20,24 +20,10 @@
# .,*++++::::::++++*,.
# ``````
import os
import numpy
from Cython.Build import cythonize
from setuptools import Extension, setup
cwd = os.path.dirname(os.path.abspath(__file__))
requirements = open(os.path.join(cwd, "requirements.txt"), "r").readlines()
with open(os.path.join(cwd, "requirements.notebooks.txt"), "r") as f:
requirements_notebooks = f.readlines()
with open(os.path.join(cwd, "requirements.dev.txt"), "r") as f:
requirements_dev = f.readlines()
with open(os.path.join(cwd, "requirements.ja.txt"), "r") as f:
requirements_ja = f.readlines()
requirements_server = ["flask>=2.0.1"]
requirements_all = requirements_dev + requirements_notebooks + requirements_ja + requirements_server
exts = [
Extension(
name="TTS.tts.utils.monotonic_align.core",
@ -47,13 +33,5 @@ exts = [
setup(
include_dirs=numpy.get_include(),
ext_modules=cythonize(exts, language_level=3),
install_requires=requirements,
extras_require={
"all": requirements_all,
"dev": requirements_dev,
"notebooks": requirements_notebooks,
"server": requirements_server,
"ja": requirements_ja,
},
zip_safe=False,
)