2025-01-11 20:00:34 -07:00
|
|
|
[project]
|
|
|
|
name = "kokoro-fastapi"
|
2025-01-31 00:44:57 -07:00
|
|
|
version = "0.1.4"
|
2025-01-11 20:00:34 -07:00
|
|
|
description = "FastAPI TTS Service"
|
|
|
|
readme = "README.md"
|
|
|
|
requires-python = ">=3.10"
|
|
|
|
dependencies = [
|
|
|
|
# Core dependencies
|
|
|
|
"fastapi==0.115.6",
|
|
|
|
"uvicorn==0.34.0",
|
|
|
|
"click>=8.0.0",
|
|
|
|
"pydantic==2.10.4",
|
|
|
|
"pydantic-settings==2.7.0",
|
|
|
|
"python-dotenv==1.0.1",
|
|
|
|
"sqlalchemy==2.0.27",
|
|
|
|
# ML/DL Base
|
|
|
|
"numpy>=1.26.0",
|
|
|
|
"scipy==1.14.1",
|
|
|
|
# Audio processing
|
|
|
|
"soundfile==0.13.0",
|
|
|
|
"regex==2024.11.6",
|
|
|
|
# Utilities
|
|
|
|
"aiofiles==23.2.1",
|
|
|
|
"tqdm==4.67.1",
|
|
|
|
"requests==2.32.3",
|
|
|
|
"munch==4.0.0",
|
|
|
|
"tiktoken==0.8.0",
|
|
|
|
"loguru==0.7.3",
|
2025-01-12 05:23:02 -07:00
|
|
|
"openai>=1.59.6",
|
2025-01-17 21:43:10 -07:00
|
|
|
"pydub>=0.25.1",
|
2025-01-22 21:11:47 -07:00
|
|
|
"matplotlib>=3.10.0",
|
2025-01-24 23:46:46 -07:00
|
|
|
"mutagen>=1.47.0",
|
2025-01-29 18:29:02 -07:00
|
|
|
"psutil>=6.1.1",
|
2025-03-25 15:42:05 -07:00
|
|
|
"kokoro @ git+https://github.com/kprinssu/kokoro.git@casual-conv1d",
|
2025-03-21 19:24:56 -07:00
|
|
|
'misaki[en,ja,ko,zh]',
|
2025-02-07 17:08:10 -07:00
|
|
|
"spacy==3.7.2",
|
2025-02-10 21:45:05 -05:00
|
|
|
"en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.7.1/en_core_web_sm-3.7.1-py3-none-any.whl",
|
|
|
|
"inflect>=7.5.0",
|
2025-02-11 18:08:36 -05:00
|
|
|
"phonemizer-fork>=3.3.2",
|
2025-03-20 19:15:07 +00:00
|
|
|
"av>=14.2.0",
|
2025-03-21 18:03:09 +00:00
|
|
|
"text2num>=2.5.1",
|
2025-01-11 20:00:34 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
[project.optional-dependencies]
|
|
|
|
gpu = [
|
2025-02-06 23:43:26 -07:00
|
|
|
"torch==2.6.0+cu124",
|
2025-01-11 20:00:34 -07:00
|
|
|
]
|
2025-01-18 13:51:47 +01:00
|
|
|
rocm = [
|
|
|
|
"torch==2.5.1+rocm6.2",
|
|
|
|
"pytorch-triton-rocm==3.1.0",
|
|
|
|
]
|
2025-01-11 20:00:34 -07:00
|
|
|
cpu = [
|
2025-02-06 23:43:26 -07:00
|
|
|
"torch==2.6.0",
|
2025-01-11 20:00:34 -07:00
|
|
|
]
|
2025-01-12 05:23:02 -07:00
|
|
|
test = [
|
2025-03-20 19:15:07 +00:00
|
|
|
"pytest==8.3.5",
|
|
|
|
"pytest-cov==6.0.0",
|
2025-01-12 05:23:02 -07:00
|
|
|
"httpx==0.26.0",
|
2025-03-20 19:15:07 +00:00
|
|
|
"pytest-asyncio==0.25.3",
|
2025-01-13 18:56:49 -07:00
|
|
|
"openai>=1.59.6",
|
2025-02-09 23:01:53 -07:00
|
|
|
"tomli>=2.0.1",
|
2025-01-12 05:23:02 -07:00
|
|
|
]
|
2025-01-11 20:00:34 -07:00
|
|
|
|
|
|
|
[tool.uv]
|
|
|
|
conflicts = [
|
|
|
|
[
|
|
|
|
{ extra = "cpu" },
|
|
|
|
{ extra = "gpu" },
|
2025-01-18 13:51:47 +01:00
|
|
|
{ extra = "rocm" },
|
2025-01-11 20:00:34 -07:00
|
|
|
],
|
|
|
|
]
|
|
|
|
|
|
|
|
[tool.uv.sources]
|
|
|
|
torch = [
|
|
|
|
{ index = "pytorch-cpu", extra = "cpu" },
|
|
|
|
{ index = "pytorch-cuda", extra = "gpu" },
|
2025-01-18 13:51:47 +01:00
|
|
|
{ index = "pytorch-rocm", extra = "rocm" },
|
|
|
|
]
|
|
|
|
# uv would not install torch for rocm6.2 without this explicit transient dependency
|
|
|
|
pytorch-triton-rocm = [
|
|
|
|
{ index = "pytorch-rocm", extra = "rocm" },
|
2025-01-11 20:00:34 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
[[tool.uv.index]]
|
|
|
|
name = "pytorch-cpu"
|
|
|
|
url = "https://download.pytorch.org/whl/cpu"
|
|
|
|
explicit = true
|
|
|
|
|
|
|
|
[[tool.uv.index]]
|
|
|
|
name = "pytorch-cuda"
|
2025-02-06 23:43:26 -07:00
|
|
|
url = "https://download.pytorch.org/whl/cu124"
|
2025-01-11 20:00:34 -07:00
|
|
|
explicit = true
|
|
|
|
|
2025-01-18 13:51:47 +01:00
|
|
|
[[tool.uv.index]]
|
|
|
|
name = "pytorch-rocm"
|
|
|
|
url = "https://download.pytorch.org/whl/rocm6.2"
|
|
|
|
explicit = true
|
|
|
|
|
2025-01-12 05:23:02 -07:00
|
|
|
[build-system]
|
|
|
|
requires = ["setuptools>=61.0"]
|
|
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
|
|
|
|
[tool.setuptools]
|
|
|
|
package-dir = {"" = "api/src"}
|
|
|
|
packages.find = {where = ["api/src"], namespaces = true}
|
|
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
|
|
testpaths = ["api/tests", "ui/tests"]
|
|
|
|
python_files = ["test_*.py"]
|
2025-03-20 19:15:07 +00:00
|
|
|
addopts = "--cov=api --cov=ui --cov-report=term-missing --cov-config=.coveragerc --full-trace"
|
|
|
|
asyncio_mode = "auto"
|