#!/usr/bin/env python """Minimal, inference-only setup for the vendored `matcha` package used by this Space. Deliberately excludes gradio/gdown-adjacent dev & training-only deps (gradio, hydra-optuna-sweeper, notebook, ipywidgets, seaborn, pre-commit, pytest, wandb/aim/etc loggers) that the upstream Matcha-TTS requirements.txt pulls in, since Hugging Face Spaces already provides gradio itself and pinning our own version here causes a dependency conflict with the platform's pinned build. """ import numpy from Cython.Build import cythonize from setuptools import Extension, find_packages, setup exts = [ Extension( name="matcha.utils.monotonic_align.core", sources=["matcha/utils/monotonic_align/core.pyx"], ) ] with open("matcha/VERSION", encoding="utf-8") as fin: version = fin.read().strip() setup( name="matcha-tts-inference", version=version, description="Vendored, inference-only Matcha-TTS for the ghana-speech-nano Space", install_requires=[ "torch>=2.0.0", "lightning>=2.0.0", "hydra-core==1.3.2", "omegaconf", "rich", "phonemizer", "Unidecode", "einops", "conformer==0.3.2", "diffusers", "matplotlib", "numpy", "gdown", "wget", "soundfile", ], include_dirs=[numpy.get_include()], include_package_data=True, packages=find_packages(include=["matcha", "matcha.*"]), ext_modules=cythonize(exts, language_level=3), python_requires=">=3.9.0", )