Add Whisper offline loading for air-gapped servers.
Pre-download via HF mirror scripts so inner-network deploys avoid Hub Network is unreachable errors. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -76,23 +76,33 @@ SYSTEM_PROMPT = (
|
||||
"去掉所有无意义的口头禅,字数不做删减。"
|
||||
)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 路径
|
||||
# ---------------------------------------------------------------------------
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
INSTALL_DIR = Path("/opt/Trading_Studio")
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Faster-Whisper 配置
|
||||
# ---------------------------------------------------------------------------
|
||||
WHISPER_MODEL_SIZE = "small"
|
||||
WHISPER_MODEL_SIZE = _env_str("WHISPER_MODEL_SIZE", "small")
|
||||
WHISPER_DEVICE = "cuda"
|
||||
WHISPER_COMPUTE_TYPE = "float16"
|
||||
WHISPER_LANGUAGE = "zh"
|
||||
WHISPER_MODEL_DIR = Path(_env_str("WHISPER_MODEL_DIR", str(BASE_DIR / "models" / "whisper")))
|
||||
|
||||
WHISPER_HF_REPO = {
|
||||
"tiny": "Systran/faster-whisper-tiny",
|
||||
"base": "Systran/faster-whisper-base",
|
||||
"small": "Systran/faster-whisper-small",
|
||||
"medium": "Systran/faster-whisper-medium",
|
||||
"large-v2": "Systran/faster-whisper-large-v2",
|
||||
"large-v3": "Systran/faster-whisper-large-v3",
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# ChatTTS 配置
|
||||
# ---------------------------------------------------------------------------
|
||||
# 标准生产安装路径(/opt,root 部署)
|
||||
INSTALL_DIR = Path("/opt/Trading_Studio")
|
||||
|
||||
# 项目根目录(开发/生产均自适应,以实际 app.py 所在目录为准)
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
|
||||
# 固定音色 Embedding 存储路径
|
||||
SPEAKER_EMB_PATH = BASE_DIR / "speaker_emb.pt"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user