Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
112 lines (102 loc) · 2.64 KB
/
Copy pathpyproject.toml
File metadata and controls
112 lines (102 loc) · 2.64 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
[project]
name = "asmr-helper"
version = "0.2.0"
description = "ASMR 音频汉化工具,支持人声分离、ASR、翻译、TTS 和智能混音"
authors = [
{name = "ASMR Helper Team"}
]
readme = "README.md"
requires-python = ">=3.11,<3.13"
license = {text = "MIT"}
keywords = ["asmr", "audio", "whisper", "tts", "translation"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
# 启动 API 与桌面端所需依赖
"edge-tts>=6.1.0",
"openai>=1.0.0",
"httpx>=0.25.0",
"soundfile>=0.12.0",
"numpy>=1.24.0",
"scipy>=1.11.0",
# 工具
"click>=8.1.0",
"pyyaml>=6.0.0",
# HTTP API
"fastapi>=0.115.0",
"pydantic>=2.0.0,<3.0.0",
"uvicorn>=0.34.0",
"pypdf>=6.10.0",
"pdfplumber>=0.11.9",
"opencc>=1.1.0",
]
[project.optional-dependencies]
# 本地 ASR / 分离 / 混音依赖较大(Demucs 会安装 CUDA PyTorch),
# 仅在需要本地音频流水线时安装,不阻塞桌面端和 API 启动。
audio = [
# CPU PyTorch keeps the local main pipeline installable on every Windows PC.
# CUDA acceleration is an optional runtime upgrade, not a startup prerequisite.
"torch>=2.4.0",
"faster-whisper>=1.0.0",
"demucs>=4.0.0",
"imageio-ffmpeg>=0.4.0",
"pytsmod>=0.3.0,<1.0.0",
]
qwen3 = [
"qwen-tts>=0.1.0",
"accelerate>=0.20.0",
# qwen-tts imports librosa/numba; current Numba rejects NumPy 2.5+.
"numpy>=2.0.0,<2.5.0",
]
funasr = [
"funasr==1.4.2",
"torch>=2.4.0",
"torchaudio>=2.4.0",
"transformers>=4.52.0,<5.0.0",
"huggingface-hub>=0.30.0",
]
qwen_asr = [
"qwen-asr",
]
voxcpm2 = [
"voxcpm>=2.0.0",
"soundfile>=0.12.0",
]
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"ruff>=0.1.0",
]
[project.scripts]
asmr-helper = "src.cli:cli"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
extend-select = ["B007", "B033", "B904", "B905"]
[tool.uv]
# Qwen3-TTS 与 Qwen-ASR 固定依赖不同的 transformers 小版本,不能共装。
conflicts = [
[
{ extra = "qwen3" },
{ extra = "qwen_asr" },
],
]
# numpy>=2.0.0 强制:numpy 1.x MINGW 构建在 Python 3.13 上会 Access Violation 崩溃
override-dependencies = [
"numpy>=2.0.0,<2.5.0",
"onnxruntime>=1.20.0,<1.24.0",
]