forked from istupakov/onnx-asr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
149 lines (132 loc) · 3.93 KB
/
pyproject.toml
File metadata and controls
149 lines (132 loc) · 3.93 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
[project]
name = "onnx-asr"
dynamic = ["version"]
description = "Automatic Speech Recognition in Python using ONNX models"
authors = [{ name = "Ilya Stupakov", email = "istupakov@gmail.com" }]
keywords = ["asr", "speech recognition", "onnx", "stt"]
dependencies = ["numpy"]
requires-python = ">=3.10"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Sound/Audio :: Speech",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Typing :: Typed",
]
[project.urls]
Documentation = "https://github.com/istupakov/onnx-asr#readme"
"Release notes" = "https://github.com/istupakov/onnx-asr/releases"
Issues = "https://github.com/istupakov/onnx-asr/issues"
Source = "https://github.com/istupakov/onnx-asr"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project.optional-dependencies]
cpu = ["onnxruntime>=1.18.1"]
gpu = ["onnxruntime-gpu>=1.18.1"]
hub = ["huggingface-hub"]
[project.scripts]
onnx-asr = "onnx_asr.cli:run"
[dependency-groups]
build = [
"onnx>=1.17.0",
"onnxscript>=0.2.5",
"torch>=2.6.0",
"torchaudio>=2.6.0",
]
asrs = [
"kaldi-native-fbank>=1.21.1",
"nemo-toolkit[asr]>=2.2.1",
"openai-whisper>=20240930",
]
test = [
"pytest>=8.3.5",
"pytest-cov>=6.1.1",
"onnxruntime>=1.21.1",
{ include-group = "build" },
{ include-group = "asrs" },
]
lint = ["ruff>=0.11.6", "mypy>=1.15.0"]
[tool.pdm]
distribution = true
[tool.pdm.version]
source = "scm"
[tool.pdm.build]
source-includes = ["preprocessors", "tests"]
[tool.pdm.scripts]
build_preprocessors = { call = "preprocessors.build:build" }
post_install = { composite = ["build_preprocessors"] }
pre_build = { composite = ["pdm sync --no-self --group build"] }
lint = { composite = ["ruff format --diff", "ruff check", "mypy ."] }
[[tool.pdm.source]]
name = "torch-cpu"
url = "https://download.pytorch.org/whl/cpu"
include_packages = ["torch", "torchaudio"]
exclude_packages = ["*"]
[tool.pdm.resolution.overrides]
numpy = "<2.2"
[tool.mypy]
python_version = "3.10"
strict = true
pretty = true
untyped_calls_exclude = "onnxruntime"
exclude = ['^preprocessors.', '^tests.preprocessors.']
[[tool.mypy.overrides]]
module = ["onnxruntime.*"]
follow_untyped_imports = true
implicit_reexport = true
[tool.ruff]
line-length = 130
indent-width = 4
target-version = "py310"
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle
"F", # Pyflakes
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"NPY", # modern numpy
"PERF", # Perflint
"PIE", # flake8-pie
"PYI", # flake8-pyi
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"SLOT", # flake8-slot
"T10", # flake8-debugger
"TID", # Disallow relative imports
"TRY", # flake8-try-except-raise
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
]
ignore = ["D203", "D213"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D100", "D103", "D104"]
"preprocessors/*" = ["D100", "D103", "D104", "N802", "N806", "F821"]
"*.ipynb" = ["D103", "RUF001"]
[tool.pytest.ini_options]
filterwarnings = [
"ignore::DeprecationWarning:google.protobuf.*",
"ignore::DeprecationWarning:torchmetrics.*",
"ignore::FutureWarning:onnxscript.*",
"ignore::DeprecationWarning:importlib.*",
]