Fix ChatTTS load: pre-download via HF mirror, avoid GitHub timeout.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -103,6 +103,14 @@ OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
|
||||
# ChatTTS 采样率(Hz)
|
||||
TTS_SAMPLE_RATE = 24000
|
||||
|
||||
# ChatTTS 模型本地目录(预下载后离线加载,避免访问 GitHub 超时)
|
||||
CHATTTS_MODEL_DIR = Path(_env_str("CHATTTS_MODEL_DIR", str(BASE_DIR / "models" / "ChatTTS")))
|
||||
|
||||
# HuggingFace 镜像(国内服务器推荐)
|
||||
HF_ENDPOINT = _env_str("HF_ENDPOINT", "https://hf-mirror.com")
|
||||
HF_HUB_DOWNLOAD_TIMEOUT = _env_int("HF_HUB_DOWNLOAD_TIMEOUT", 600)
|
||||
HF_HOME = Path(_env_str("HF_HOME", str(BASE_DIR / "models" / "hf_cache")))
|
||||
|
||||
# 音色样本时长建议(秒)
|
||||
SPEAKER_SAMPLE_MIN_SEC = 10
|
||||
SPEAKER_SAMPLE_MAX_SEC = 30
|
||||
|
||||
Reference in New Issue
Block a user