walusungungulube commited on
Commit
da63593
·
verified ·
1 Parent(s): be5c88a

Upload 2 files

Browse files
Files changed (2) hide show
  1. pyproject.toml +3 -0
  2. setup.py +49 -0
pyproject.toml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ [build-system]
2
+ requires = ["setuptools", "wheel", "cython", "numpy"]
3
+ build-backend = "setuptools.build_meta"
setup.py ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ """Minimal, inference-only setup for the vendored `matcha` package used by this Space.
3
+
4
+ Deliberately excludes gradio/gdown-adjacent dev & training-only deps (gradio, hydra-optuna-sweeper,
5
+ notebook, ipywidgets, seaborn, pre-commit, pytest, wandb/aim/etc loggers) that the upstream
6
+ Matcha-TTS requirements.txt pulls in, since Hugging Face Spaces already provides gradio itself
7
+ and pinning our own version here causes a dependency conflict with the platform's pinned build.
8
+ """
9
+ import numpy
10
+ from Cython.Build import cythonize
11
+ from setuptools import Extension, find_packages, setup
12
+
13
+ exts = [
14
+ Extension(
15
+ name="matcha.utils.monotonic_align.core",
16
+ sources=["matcha/utils/monotonic_align/core.pyx"],
17
+ )
18
+ ]
19
+
20
+ with open("matcha/VERSION", encoding="utf-8") as fin:
21
+ version = fin.read().strip()
22
+
23
+ setup(
24
+ name="matcha-tts-inference",
25
+ version=version,
26
+ description="Vendored, inference-only Matcha-TTS for the ghana-speech-nano Space",
27
+ install_requires=[
28
+ "torch>=2.0.0",
29
+ "lightning>=2.0.0",
30
+ "hydra-core==1.3.2",
31
+ "omegaconf",
32
+ "rich",
33
+ "phonemizer",
34
+ "Unidecode",
35
+ "einops",
36
+ "conformer==0.3.2",
37
+ "diffusers",
38
+ "matplotlib",
39
+ "numpy",
40
+ "gdown",
41
+ "wget",
42
+ "soundfile",
43
+ ],
44
+ include_dirs=[numpy.get_include()],
45
+ include_package_data=True,
46
+ packages=find_packages(include=["matcha", "matcha.*"]),
47
+ ext_modules=cythonize(exts, language_level=3),
48
+ python_requires=">=3.9.0",
49
+ )