Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
164 lines (151 loc) · 4.32 KB
/
Copy pathpyproject.toml
File metadata and controls
164 lines (151 loc) · 4.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
[build-system]
requires = ["setuptools>=78.1.1", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "whisperx-fastapi"
version = "0.4.5"
description = "WhisperX REST API for audio transcription, alignment, and diarization"
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "Pavel Zbornik", email = "12965149+pavelzbornik@users.noreply.github.com" }
]
requires-python = ">=3.10"
keywords = ["whisper", "fastapi", "transcription", "speech-to-text", "diarization"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: GPU :: NVIDIA CUDA",
"Framework :: FastAPI",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Multimedia :: Sound/Audio :: Speech",
]
dependencies = [
"colorlog==6.10.1",
"dependency-injector>=4.41.0",
"fastapi==0.128.0",
"gunicorn==23.0.0",
"httpx==0.28.1",
"numba==0.63.1",
"pydantic-settings>=2.0.0",
"python-dotenv==1.2.1",
"python-multipart==0.0.22",
"tqdm==4.67.1",
"uvicorn==0.40.0",
"whisperx==3.7.4",
"torch<=2.8.0",
"torchaudio<=2.8.0",
"torchvision<=0.23.0",
"setuptools>=78.1.1", # CVE-2025-47273 fix
]
[project.optional-dependencies]
dev = [
"codespell==2.4.1",
"factory-boy==3.3.3",
"mypy==1.19.1",
"pandas-stubs>=2.1.0",
"pre-commit==4.5.1",
"pytest==9.0.2",
"pytest-cov==7.0.0",
"ruff==0.14.11",
"types-requests>=2.31.0",
"types-PyYAML>=6.0.12",
]
[tool.uv]
# PyTorch index configuration with environment markers for platform-specific builds
# CUDA 12.6 on Linux, CPU-only on Windows and macOS
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", marker = "sys_platform == 'darwin'" },
{ index = "pytorch-cpu", marker = "platform_machine != 'x86_64' and sys_platform != 'darwin'" },
{ index = "pytorch", marker = "platform_machine == 'x86_64' and sys_platform != 'darwin'" },
]
torchaudio = [
{ index = "pytorch-cpu", marker = "sys_platform == 'darwin'" },
{ index = "pytorch-cpu", marker = "platform_machine != 'x86_64' and sys_platform != 'darwin'" },
{ index = "pytorch", marker = "platform_machine == 'x86_64' and sys_platform != 'darwin'" },
]
triton = [
{ index = "pytorch", marker = "sys_platform == 'linux'" },
]
[[tool.uv.index]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.isort]
profile = "black"
skip_glob = ["migrations/*"]
[tool.codespell]
skip = ["*.json","*.yaml","*.lock"]
builtin = "clear,rare,informal,usage,code,names"
ignore-words-list = "dne,iam,IAM,ro,jupyter,rouge,ba,thead,master,implementors,UIs,aNULL"
[tool.coverage.run]
source = ["app"]
omit = [
"tests/*",
"/tmp/*",
"venv/*",
"*/virtualenv/*",
"*/site-packages/*"
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"pass",
"raise ImportError"
]
ignore_errors = true
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_any_unimported = false
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
check_untyped_defs = true
strict_equality = true
disallow_untyped_calls = false
disallow_incomplete_defs = true
disallow_untyped_decorators = false
ignore_missing_imports = true
follow_imports = "normal"
show_error_codes = true
show_column_numbers = true
pretty = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"unit: Fast unit tests with all dependencies mocked",
"integration: Integration tests with real database or external services",
"e2e: End-to-end tests through API",
"slow: Slow tests (ML operations, large files)",
]
addopts = "-v --strict-markers --strict-config"
[[tool.mypy.overrides]]
module = [
"whisperx.*",
"pyannote.*",
"torch.*",
"torchaudio.*",
"pandas.*",
"numpy.*",
]
ignore_missing_imports = true