[project]
name = "voxid"
version = "0.3.0"
description = "Voice Identity Management Platform"
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
authors = [
    { name = "Tom Mathews", email = "mathews.tom@gmail.com" },
]
keywords = ["voice", "identity", "tts", "voice-cloning", "enrollment", "speech"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: Apache Software License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.12",
    "Topic :: Multimedia :: Sound/Audio :: Speech",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Typing :: Typed",
]

dependencies = [
    "pydantic>=2.0",
    "safetensors>=0.4",
    "soundfile>=0.12",
    "pydub>=0.25",
    "click>=8.0",
    "tomli>=2.0",
    "tomli-w>=1.0",
    "numpy>=1.26",
    "fastapi>=0.135.1",
    "uvicorn>=0.42.0",
    "sse-starlette>=3.3.3",
    "cmudict>=1.1.3",
    "pyloudnorm>=0.2.0",
    "sounddevice>=0.5.3",
    "python-multipart>=0.0.22",
]

[project.optional-dependencies]
spoofing = [
    "torch>=2.0",
    "librosa>=0.10",
    "scipy>=1.12",
]
tokenizer = [
    "transformers>=4.40",
    "scikit-learn>=1.4",
    "torch>=2.0",
    "huggingface-hub>=0.20",
]
qwen3-tts = ["qwen-tts>=0.1"]
qwen3-tts-mlx = [
    "mlx-audio>=0.4",
]
serving = [
    "vllm>=0.4",
    "torch>=2.0",
]
dev = [
    "pytest>=8.0",
    "pytest-cov>=5.0",
    "mypy>=1.10",
    "ruff>=0.4",
    "httpx>=0.28.1",
    "pytest-asyncio>=1.3.0",
]

[project.scripts]
voxid = "voxid.cli:cli"

[project.urls]
Homepage = "https://github.com/Mathews-Tom/VoxID"
Repository = "https://github.com/Mathews-Tom/VoxID"
Documentation = "https://github.com/Mathews-Tom/VoxID/tree/main/docs"
Issues = "https://github.com/Mathews-Tom/VoxID/issues"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/voxid"]

[tool.mypy]
strict = true
python_version = "3.12"

[[tool.mypy.overrides]]
module = "tomli_w"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "qwen_tts"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "qwen_tts.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "mlx_audio.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "torch"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "torch.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "librosa"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "librosa.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "scipy"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "scipy.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "pyloudnorm"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "pyloudnorm.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "sounddevice"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "soundfile"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "webrtcvad"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "transformers"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "transformers.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "sklearn"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "sklearn.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "huggingface_hub"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "huggingface_hub.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "decoder"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "decoder.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "vllm"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "vllm.*"
ignore_missing_imports = true

[tool.ruff]
target-version = "py312"
src = ["src"]

[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "bench_*.py"]
addopts = "--strict-markers -v"

[tool.uv]
conflicts = [
    [
        { extra = "qwen3-tts" },
        { extra = "qwen3-tts-mlx" },
    ],
]

[dependency-groups]
dev = [
    "soundfile>=0.13.1",
]
