-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequirements.txt
More file actions
151 lines (128 loc) · 5.42 KB
/
requirements.txt
File metadata and controls
151 lines (128 loc) · 5.42 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
# ============================================================
# 全球化内容供应商 - 依赖清单
# 基于 pipreqs 扫描实际代码使用情况 (2026-01-23)
# ============================================================
# -------------------- 核心框架 --------------------
# Web框架
fastapi>=0.109.0
python-multipart>=0.0.6
uvicorn[standard]>=0.27.0
pydantic>=2.12.5
pydantic-settings>=2.1.0
# 配置管理
python-dotenv>=1.2.1
PyYAML>=6.0.3
watchdog>=3.0.0 # 文件监控,用于配置热重载
# -------------------- HTTP/网络 --------------------
httpx>=0.26.0
aiohttp>=3.11.0
requests>=2.32.5
tenacity>=9.0.0 # 重试机制
# -------------------- 音视频处理 --------------------
ffmpeg-python==0.2.0
pydub>=0.25.1
librosa>=0.10.1
soundfile>=0.12.1
audioread>=3.0.1
yt-dlp # 视频下载
# -------------------- PyTorch (CUDA 11.8) --------------------
# 注意:需要从 CUDA 源安装,不能使用默认 PyPI 版本
# pip install torch==2.7.1+cu118 torchaudio==2.7.1+cu118 torchvision==0.22.1+cu118 --index-url https://download.pytorch.org/whl/cu118
torch>=2.7.1
torchaudio>=2.7.1
# -------------------- AI/ML 框架 --------------------
# 注意:transformers 必须 < 4.50.0,否则 XTTS 的 GPT2InferenceModel.generate() 会失败
transformers>=4.33.0,<4.50.0
huggingface-hub>=0.25.0
# TensorFlow (用于某些模型)
tensorflow>=2.15.0
keras>=2.15.0
# ONNX Runtime GPU
onnxruntime>=1.16.0
onnxruntime-gpu>=1.16.0
# -------------------- ASR 语音识别 --------------------
openai-whisper # Whisper 语音识别
# whisperx 已安装(pip install whisperx)
# -------------------- TTS 语音合成 --------------------
TTS>=0.22.0 # Coqui XTTS v2 - 支持 16 种语言的零样本声音克隆
# TTS 语言支持依赖
pypinyin>=0.50.0 # 中文
mecab-python3 # 日语
unidic-lite # 日语词典
jamo # 韩语
pyrubberband # 时长对齐
# -------------------- 音频处理 --------------------
demucs>=4.0.1 # 人声分离
denoiser>=0.1.5 # Facebook AI 语音降噪
# -------------------- 说话人分离 --------------------
pyannote.audio>=3.1.0
pyannote.core>=5.0.0
pyannote.database>=5.0.0
pyannote.metrics>=3.2.0
pyannote.pipeline>=3.0.0
speechbrain>=0.5.16 # 说话人识别
# -------------------- 视频分析/音画同步 --------------------
# 人脸检测和嘴型分析
mediapipe>=0.10.9
# 计算机视觉基础
opencv-python>=4.8.0
# RIFE 帧插值 (可选 - 使用NCNN加速)
# pip install rife-ncnn-vulkan-python
# 如果安装失败,系统会自动回退到FFmpeg minterpolate
# Wav2Lip 嘴型驱动 (需要额外步骤)
# 需要从 https://github.com/Rudrabha/Wav2Lip 下载模型
# 将模型文件放置到 models/wav2lip/wav2lip.pth 和 wav2lip_gan.pth
# 如果模型不存在,系统会自动回退到简单音视频合并
# GPU 监控
nvidia-ml-py3>=7.352.0
# -------------------- GUI --------------------
PyQt6>=6.6.0
# -------------------- 工具库 --------------------
loguru>=0.7.3 # 日志
numpy<2.0 # 注意:必须使用 1.x 版本,兼容 TensorFlow/OpenVoice/MeloTTS
tqdm>=4.67.0
# -------------------- 测试 --------------------
pytest>=7.4.4
pytest-asyncio>=0.24.0
pytest-cov>=4.1.0
# -------------------- 代码质量 --------------------
black>=24.0.0
isort>=5.13.2
flake8>=7.0.0
mypy>=1.8.0
# ============================================================
# 特殊安装说明:
#
# 1. PyTorch CUDA 版本 (必须使用 CUDA 源):
# pip install torch==2.7.1+cu118 torchaudio==2.7.1+cu118 torchvision==0.22.1+cu118 --index-url https://download.pytorch.org/whl/cu118
#
# 2. WhisperX (高精度 ASR):
# pip install whisperx
#
# 3. numpy 版本约束:
# pip install "numpy<2.0" --force-reinstall
#
# 4. 已知依赖冲突 (不影响运行,已通过代码补丁/版本约束解决):
# ┌─────────────────────────────────────────────────────────────────┐
# │ 冲突 │ 状态 │ 解决方案 │
# ├─────────────────────────────────────────────────────────────────┤
# │ TTS 要求 pandas<2.0 │ ✅ 可用 │ 实际兼容 pandas 2.x │
# │ TTS + transformers 4.50+ │ ✅ 已修复│ 版本约束 <4.50.0 │
# │ whisperx 声明 numpy>=2.0 │ ✅ 可用 │ 实际兼容 numpy 1.26.x │
# │ whisperx 声明 torch~=2.8.0 │ ✅ 可用 │ 实际兼容 torch 2.7.x │
# │ denoiser 要求 hydra<1.0 │ ✅ 可用 │ 实际兼容 hydra 1.3.x │
# │ opentelemetry protobuf │ ⚠️ 警告 │ 不影响核心功能 │
# └─────────────────────────────────────────────────────────────────┘
#
# 关键约束:
# - transformers<4.50.0: XTTS GPT2InferenceModel.generate() 兼容性
# - numpy<2.0: TensorFlow/gruut/numba 兼容性
#
# 5. 测试验证 (2026-01-23):
# - VoiceCloningTTSService: ✅ (实际音频合成成功)
# - ASRService (whisperx): ✅
# - VocalSeparatorService (demucs): ✅
# - AudioDenoiserService (denoiser): ✅
# - SpeakerDiarizationService (pyannote): ✅
# - TensorFlow 2.15.0: ✅
# ============================================================