GPT-SoVITS/requirements.txt
XucroYuri 7be8a59e52 feat: add training model/sample browsing API + WebUI, relax ref audio duration
为 TTS More 工作台增加远程获取训练数据的能力,并解除参考音频时长的硬编码阻断。

API (api_v2.py, 端口 9880):
- GET  /models                       列出训练角色(exp_name)及匹配权重
- GET  /models/{name}/samples        列出训练样本(音频+参考文本), 含目录穿越校验
- GET  /status                       当前权重/版本/设备状态
- POST /upload_ref                   上传参考音频, 文件名白名单清洗

Gradio WebUI (inference_webui.py):
- 新增「训练角色选择」区域: 模型名下拉/刷新/自动匹配权重/样本下拉/预览/应用样本
- on_auto_select_weights 采用稳健写法: 仅返回 Dropdown 值, 由已有 .change
  绑定触发切换 (change_sovits_weights 是生成器, 手动消费会丢失组件更新)

时长硬编码解除 (3~10s 不再阻断):
- TTS_infer_pack/TTS.py:815       raise OSError -> print [Warning]
- inference_webui.py:853          raise OSError -> gr.Warning (建议性文案)
- inference_webui.py:1367         标签改为「推荐3~10秒」

依赖: requirements.txt 追加 python-multipart (/upload_ref 必需)

向后兼容: 现有 /tts /set_gpt_weights /set_sovits_weights 签名与返回不变,
TTS 推理 pipeline 本体逻辑未改。所有改动 py_compile 通过。
2026-07-07 11:32:14 +08:00

47 lines
764 B
Plaintext

--no-binary=opencc
numpy<2.0
scipy
tensorboard
librosa==0.10.2
numba
pytorch-lightning>=2.4
gradio<5
ffmpeg-python
onnxruntime; platform_machine == "aarch64" or platform_machine == "arm64"
onnxruntime-gpu; platform_machine == "x86_64" or platform_machine == "AMD64"
tqdm
funasr>=1.3.7
cn2an
pypinyin
pyopenjtalk>=0.4.1
g2p_en
torchaudio
modelscope
sentencepiece
transformers>=4.43,<=4.50
peft<0.18.0
chardet
PyYAML
psutil
jieba_fast
jieba
split-lang
fast_langdetect>=0.3.1
wordsegment
rotary_embedding_torch
ToJyutping
g2pk2
ko_pron
opencc
python_mecab_ko; sys_platform != 'win32'
fastapi[standard]>=0.115.2
x_transformers
torchmetrics<=1.5
pydantic<=2.10.6
ctranslate2>=4.0,<5
av>=11
tqdm
# FastAPI file upload support for /upload_ref endpoint
python-multipart