## Root cause: voice not appearing + poor Russian quality 1. Mounting gpu/tts/config over /app/config created an EMPTY directory, overwriting the Docker image's built-in voice_to_speaker.yaml. Custom voices uploaded via the API were saved to this empty dir, but the default voices (alloy, nova, etc.) disappeared. 2. XTTSv2 (tts-1-hd) speaks Russian with an accent, wrong stress, swallows letters. It's English-trained multilingual — not ideal for Russian. ## Fix ### Custom entrypoint (gpu/tts/entrypoint.sh) Instead of mounting an empty dir over /app/config, we use a custom entrypoint that: 1. On first run, checks if voice_to_speaker.yaml exists in /app/config/ 2. If not — tries to copy defaults from the Docker image 3. If that fails — creates a default config with: - Piper English voices (alloy, echo, fable, onyx, nova, shimmer) - Piper Russian voices (irina, denis) ← NEW - XTTS voices (alloy, echo, fable, onyx, nova, shimmer) 4. Also creates empty pre_process_map.yaml if missing 5. Then exec's the original python /app/app.py ### Piper Russian voices - Added irina (female) and denis (male) to the default config - Created download-ru-voices.sh script that downloads: irina, denis, dmitri, ruslan from HuggingFace (rhasspy/piper-voices) - These are NATIVE Russian-trained voices — no accent, correct stress - Use with model 'tts-1' (NOT 'tts-1-hd') ### compose.yaml - Added mount: gpu/tts/entrypoint.sh → /app/custom-entrypoint.sh - Changed entrypoint to use custom-entrypoint.sh ### TTSTab UI - Added 'Russian voices' info section explaining: - tts-1 with irina/denis = natural Russian, no accent - tts-1-hd with XTTS = less natural for Russian - How to download Piper voices: sh gpu/tts/download-ru-voices.sh ### /api/tts/generate - Accepts optional 'language' field (passed through to openedai-speech) - Better error messages ## After merge 1. Build and recreate: docker compose --profile tts up -d --force-recreate tts 2. Download Russian Piper voices: sh gpu/tts/download-ru-voices.sh 3. Restart TTS again (so it picks up the voices): docker compose --profile tts restart tts 4. In TTS tab: - Model: tts-1 (Piper) - Voice: irina (female) or denis (male) - Type Russian text → natural, no accent! Version → 0.9.0
211 lines
5.9 KiB
YAML
211 lines
5.9 KiB
YAML
# ---------------------------------------------------------------------------
|
|
# Validate HOST_PROJECT_PATH early — if it's empty, the `ssh` container will
|
|
# exit with "HOST_PROJECT_PATH is not set" and after a server reboot only
|
|
# tailscale will come back (because ssh keeps crash-looping on restart: always).
|
|
# ---------------------------------------------------------------------------
|
|
# ${HOST_PROJECT_PATH:?ERROR: HOST_PROJECT_PATH must be set in .env — see .env.example}
|
|
|
|
name: ${TAILSCALE_HOSTNAME:-gpu-node}
|
|
|
|
services:
|
|
tailscale:
|
|
image: tailscale/tailscale:latest
|
|
container_name: ${TAILSCALE_HOSTNAME:-gpu-node}-tailscale
|
|
hostname: ${TAILSCALE_HOSTNAME:-gpu-node}
|
|
environment:
|
|
TS_AUTHKEY: ${TS_AUTHKEY}
|
|
TS_STATE_DIR: /var/lib/tailscale
|
|
TS_SERVE_CONFIG: /config/serve.json
|
|
volumes:
|
|
- ${HOST_PROJECT_PATH:-.}/tailscale/state:/var/lib/tailscale
|
|
- ${HOST_PROJECT_PATH:-.}/tailscale/config:/config:ro
|
|
networks:
|
|
- gpu-node
|
|
restart: always
|
|
labels:
|
|
- "node.role=tailscale"
|
|
- "node.instance=${TAILSCALE_HOSTNAME:-gpu-node}"
|
|
|
|
ssh:
|
|
image: gpu-node-ssh
|
|
container_name: ${TAILSCALE_HOSTNAME:-gpu-node}-ssh-main
|
|
hostname: ssh-main
|
|
environment:
|
|
HOST_PROJECT_PATH: ${HOST_PROJECT_PATH}
|
|
SSH_ROLE: main
|
|
SSH_PORT: "22"
|
|
NODE_INSTANCE: ${TAILSCALE_HOSTNAME:-gpu-node}
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ${HOST_PROJECT_PATH:-./}:/project
|
|
networks:
|
|
- gpu-node
|
|
restart: always
|
|
labels:
|
|
- "node.role=ssh-main"
|
|
- "node.instance=${TAILSCALE_HOSTNAME:-gpu-node}"
|
|
|
|
ssh-companion:
|
|
profiles:
|
|
- wake
|
|
image: gpu-node-ssh
|
|
container_name: ${TAILSCALE_HOSTNAME:-gpu-node}-ssh-companion
|
|
hostname: ssh-companion
|
|
environment:
|
|
HOST_PROJECT_PATH: ${HOST_PROJECT_PATH}
|
|
SSH_ROLE: companion
|
|
SSH_PORT: "2222"
|
|
NODE_INSTANCE: ${TAILSCALE_HOSTNAME:-gpu-node}
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ${HOST_PROJECT_PATH:-./}:/project
|
|
networks:
|
|
- gpu-node
|
|
restart: always
|
|
labels:
|
|
- "node.role=ssh-companion"
|
|
- "node.instance=${TAILSCALE_HOSTNAME:-gpu-node}"
|
|
|
|
webdav:
|
|
profiles:
|
|
- wake
|
|
image: rclone/rclone:latest
|
|
container_name: ${TAILSCALE_HOSTNAME:-gpu-node}-webdav
|
|
hostname: webdav
|
|
command:
|
|
- serve
|
|
- webdav
|
|
- /data
|
|
- --addr
|
|
- :8080
|
|
- --user
|
|
- ${WEBDAV_USER:-operator}
|
|
- --pass
|
|
- ${WEBDAV_PASS}
|
|
volumes:
|
|
- ${HOST_PROJECT_PATH:-./}:/data
|
|
networks:
|
|
- gpu-node
|
|
restart: always
|
|
labels:
|
|
- "node.role=webdav"
|
|
- "node.instance=${TAILSCALE_HOSTNAME:-gpu-node}"
|
|
|
|
gpu-test:
|
|
profiles:
|
|
- test
|
|
image: gpu-node-gpu-test
|
|
container_name: ${TAILSCALE_HOSTNAME:-gpu-node}-gpu-test
|
|
gpus: all
|
|
networks:
|
|
- gpu-node
|
|
restart: "no"
|
|
labels:
|
|
- "node.role=gpu-test"
|
|
- "node.instance=${TAILSCALE_HOSTNAME:-gpu-node}"
|
|
|
|
model-worker:
|
|
profiles:
|
|
- wake
|
|
image: gpu-node-model-worker
|
|
container_name: ${TAILSCALE_HOSTNAME:-gpu-node}-model-worker
|
|
volumes:
|
|
- ${HOST_PROJECT_PATH:-./}/gpu/comfy/models:/models
|
|
- ${HOST_PROJECT_PATH:-./}/gpu/model-worker:/state
|
|
networks:
|
|
- gpu-node
|
|
restart: always
|
|
labels:
|
|
- "node.role=model-worker"
|
|
- "node.instance=${TAILSCALE_HOSTNAME:-gpu-node}"
|
|
|
|
llama:
|
|
profiles:
|
|
- llama
|
|
image: ghcr.io/ggml-org/llama.cpp:server-cuda
|
|
container_name: ${TAILSCALE_HOSTNAME:-gpu-node}-llama
|
|
gpus: all
|
|
volumes:
|
|
- ${HOST_PROJECT_PATH:-./}/gpu/llama_models:/models
|
|
command: >
|
|
--host 0.0.0.0
|
|
--port 8080
|
|
--model /models/${LLAMA_MODEL:-model.gguf}
|
|
${LLAMA_EXTRA_ARGS:-}
|
|
networks:
|
|
- gpu-node
|
|
restart: "no"
|
|
labels:
|
|
- "node.role=llama"
|
|
- "node.instance=${TAILSCALE_HOSTNAME:-gpu-node}"
|
|
|
|
comfyui:
|
|
profiles:
|
|
- comfy
|
|
image: mmartial/comfyui-nvidia-docker:latest
|
|
container_name: ${TAILSCALE_HOSTNAME:-gpu-node}-comfyui
|
|
init: true
|
|
gpus: all
|
|
volumes:
|
|
- ${COMFY_RUN_HOST:-./comfyui/run}:/comfy/mnt
|
|
- ${COMFY_BASE_HOST:-./gpu/comfy}:/basedir
|
|
environment:
|
|
USE_UV: "true"
|
|
WANTED_UID: "1000"
|
|
WANTED_GID: "1000"
|
|
BASE_DIRECTORY: "/basedir"
|
|
SECURITY_LEVEL: "normal"
|
|
COMFY_CMDLINE_EXTRA: ${COMFY_EXTRA_ARGS:-}
|
|
networks:
|
|
- gpu-node
|
|
restart: "no"
|
|
labels:
|
|
- "node.role=comfyui"
|
|
- "node.instance=${TAILSCALE_HOSTNAME:-gpu-node}"
|
|
|
|
tts:
|
|
profiles:
|
|
- tts
|
|
image: ghcr.io/matatonic/openedai-speech:latest
|
|
container_name: ${TAILSCALE_HOSTNAME:-gpu-node}-tts
|
|
gpus: all
|
|
volumes:
|
|
- ${HOST_PROJECT_PATH:-./}/gpu/tts/voices:/app/voices
|
|
- ${HOST_PROJECT_PATH:-./}/gpu/tts/cache:/app/cache
|
|
- ${HOST_PROJECT_PATH:-./}/gpu/tts/config:/app/config
|
|
- ${HOST_PROJECT_PATH:-./}/gpu/tts/entrypoint.sh:/app/custom-entrypoint.sh
|
|
entrypoint: ["/bin/sh", "/app/custom-entrypoint.sh"]
|
|
environment:
|
|
PORT: 8000
|
|
HALF_PRECISION: "false"
|
|
TTS_ALLOWED_PLAYERS: "*"
|
|
networks:
|
|
- gpu-node
|
|
restart: "no"
|
|
labels:
|
|
- "node.role=tts"
|
|
- "node.instance=${TAILSCALE_HOSTNAME:-gpu-node}"
|
|
|
|
dashboard:
|
|
image: gpu-node-dashboard
|
|
container_name: ${TAILSCALE_HOSTNAME:-gpu-node}-dashboard
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ${HOST_PROJECT_PATH:-./}:/project
|
|
environment:
|
|
HOST_PROJECT_PATH: ${HOST_PROJECT_PATH}
|
|
PROJECT_DIR: /project
|
|
LLAMA_MODELS_DIR: /project/gpu/llama_models
|
|
NODE_INSTANCE: ${TAILSCALE_HOSTNAME:-gpu-node}
|
|
TAILSCALE_HOSTNAME: ${TAILSCALE_HOSTNAME:-gpu-node}
|
|
networks:
|
|
- gpu-node
|
|
restart: always
|
|
labels:
|
|
- "node.role=dashboard"
|
|
- "node.instance=${TAILSCALE_HOSTNAME:-gpu-node}"
|
|
|
|
networks:
|
|
gpu-node:
|
|
name: ${TAILSCALE_HOSTNAME:-gpu-node}
|