[project] name = "kokoro-fastapi" version = "0.9.1-rc1" description = "FastAPI TTS Service" readme = "README.md" requires-python = ">=3.10" dependencies = [ # Core dependencies "fastapi>=0.128.8", "starlette>=1.3.1", "uvicorn==0.34.0", "click>=8.0.0", "pydantic==2.10.4", "pydantic-settings==2.7.0", "python-dotenv==1.2.2", "sqlalchemy==2.0.27", # ML/DL Base "numpy>=1.26.0", "scipy==1.14.1", # Audio processing "soundfile==0.13.0", "inno-kokoro==0.2.0", "python-multipart>=0.0.20", "regex>=2025.10.22", "unicode-segmentation-rs>=0.3.3", # Utilities "aiofiles==23.2.1", "tqdm==4.67.1", "requests==2.33.0", "munch==4.0.0", "tiktoken==0.8.0", "loguru==0.7.3", "openai>=1.59.6", "mutagen>=1.47.0", "psutil>=6.1.1", "espeakng-loader==0.2.4", "kokoro==0.9.4", "transformers>=5.5.0,<6", "misaki[en,ja,ko,zh]==0.9.4", "pyopenjtalk-plus>=0.4.1 ; sys_platform == 'win32'", "spacy==3.8.5", "en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl", "inflect>=7.5.0", "phonemizer-fork>=3.3.2", "av>=14.2.0", "text2num>=2.5.1", ] [project.optional-dependencies] gpu = [ "torch==2.8.0+cu126 ; platform_machine == 'x86_64'", "torch==2.8.0+cu129 ; platform_machine == 'aarch64'", ] # Blackwell / RTX 50-series variant. cu128 wheels carry sm_120 kernels but # drop Maxwell/Pascal, so this is a separate extra rather than the default. # See #443. aarch64 already ships cu129 (Blackwell-capable) under both extras. gpu-cu128 = [ "torch==2.8.0+cu128 ; platform_machine == 'x86_64'", "torch==2.8.0+cu129 ; platform_machine == 'aarch64'", ] cpu = ["torch==2.8.0"] rocm = [ "torch==2.8.0+rocm6.4", "pytorch-triton-rocm>=3.2.0", ] test = [ "pytest==8.3.5", "pytest-cov==6.0.0", "httpx==0.26.0", "pytest-asyncio==0.25.3", "tomli>=2.0.1", "jinja2>=3.1.6", "hypothesis==6.167.1", ] # Integration test deps (faster-whisper, jiwer, soundfile, etc.) intentionally # live in the tts-api-test-client image, not here. Run via: # docker compose -f docker/docker-compose.test.yml up --build \ # --abort-on-container-exit --exit-code-from test-client [tool.uv] conflicts = [ [ { extra = "cpu" }, { extra = "gpu" }, { extra = "gpu-cu128" }, { extra = "rocm" }, ], ] override-dependencies = [ "triton>=3.5.1 ; platform_machine == 'aarch64'", "pyopenjtalk ; sys_platform != 'win32'", ] [tool.uv.sources] torch = [ { index = "pytorch-cpu", extra = "cpu" }, { index = "pytorch-cu126", extra = "gpu", marker = "platform_machine == 'x86_64'" }, { index = "pytorch-cu129", extra = "gpu", marker = "platform_machine == 'aarch64'" }, { index = "pytorch-cu128", extra = "gpu-cu128", marker = "platform_machine == 'x86_64'" }, { index = "pytorch-cu129", extra = "gpu-cu128", marker = "platform_machine == 'aarch64'" }, { index = "pytorch-rocm", extra = "rocm" }, ] pytorch-triton-rocm = [ { index = "pytorch-rocm", extra = "rocm" }, ] [[tool.uv.index]] name = "pytorch-cpu" url = "https://download.pytorch.org/whl/cpu" explicit = true [[tool.uv.index]] name = "pytorch-cu126" url = "https://download.pytorch.org/whl/cu126" explicit = true [[tool.uv.index]] name = "pytorch-cu128" url = "https://download.pytorch.org/whl/cu128" explicit = true [[tool.uv.index]] name = "pytorch-cu129" url = "https://download.pytorch.org/whl/cu129" explicit = true [[tool.uv.index]] name = "pytorch-rocm" url = "https://download.pytorch.org/whl/rocm6.4" explicit = true [build-system] requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" [tool.setuptools] package-dir = { "" = "api/src" } packages.find = { where = ["api/src"], namespaces = true }