Files
hermes 65c2ea3d50 feat(pinokio): clean one-click launcher for multi-tts-server
- install: clone app source, create venv, install deps + torch + models
- start: daemon uvicorn on 127.0.0.1 with auto-captured URL
- reset: remove venv/cache/models but keep source
- update: pull both launcher and app, then re-install
- sanitized: no local env details, no TODO/DONE
- icon.png included
2026-07-04 01:38:23 +08:00

75 lines
2.5 KiB
JavaScript

// Multi-TTS-Server installer
// 1. Clone app source code into app/
// 2. Create venv under app/ and install Python deps
// 3. Install platform-specific torch (CUDA 12.8 / DirectML / CPU)
// 4. Pre-download the minimal TTS model set (~6.7 GB):
// - NeuroDonu/RU-XTTS-DonuModel (5.3 GB)
// - Misha24-10/F5-TTS_RUSSIAN/F5TTS_v1_Base_v2 (1.3 GB)
// - pavolgebciar/vocos-mel-24khz (52 MB)
module.exports = {
requires: {
bundle: "ai",
},
run: [
// 1. Clone the app source code
{
method: "shell.run",
params: {
message: [
"git clone https://gitea.amakusa.ru/hermes/multi-tts-server.git app"
]
}
},
// 2. Create venv under app/ and install Python deps
{
method: "shell.run",
params: {
venv: "venv",
path: "app",
message: [
"uv venv --python 3.11",
"uv pip install --upgrade pip wheel setuptools==80.9.0",
"uv pip install -r requirements.txt",
]
}
},
// 3. Platform-specific torch install (CUDA 12.8 for NVIDIA, DirectML for AMD, CPU fallback)
{
method: "script.start",
params: {
uri: "torch.js",
params: { venv: "venv", path: "app" }
}
},
// 4. Download only the required TTS models (~6.7 GB total):
// - NeuroDonu/RU-XTTS-DonuModel ~5.3 GB
// - Misha24-10/F5-TTS_RUSSIAN ~1.3 GB
// - pavolgebciar/vocos-mel-24khz ~52 MB
{
method: "shell.run",
params: {
venv: "venv",
path: "app",
message: [
"python -c \"from huggingface_hub import snapshot_download; snapshot_download('NeuroDonu/RU-XTTS-DonuModel', local_dir='models/xtts-v2/NeuroDonu__RU-XTTS-DonuModel')\"",
"python -c \"from huggingface_hub import snapshot_download; repo='Misha24-10/F5-TTS_RUSSIAN'; base='models/f5-tts/Misha24-10__F5-TTS_RUSSIAN'; snapshot_download(repo, local_dir=base, ignore_patterns=['**/F5TTS_v1_Base_v4_winter/**','**/F5TTS_v1_Base_accent_tune/**','**/F5TTS_v1_Base/**/model_last.pt','**/F5TTS_v1_Base/**/model_last.safetensors','**/F5TTS_v1_Base_v2/**/model_last.pt'])\"",
"python -c \"from huggingface_hub import snapshot_download; snapshot_download('pavolgebciar/vocos-mel-24khz', local_dir='models/vocos/pavolgebciar__vocos-mel-24khz')\"",
]
}
},
// 5. Install Done modal
{
id: "end",
method: "input",
params: {
title: "Install Complete",
description: "Multi-TTS-Server is ready. Click Start to launch the API + Gradio Web UI."
}
}
]
}