Files
esh-pfi-infrastructure/stacks/cosyvoice/.env.example
T
vh 1a67370138 parakeet + cosyvoice: add stacks + deploy to irv-ml1
Two new speech stacks on irv-ml1, both on the /worktank/<stack>/
pattern, no tnet (irv-ml1 is local-endpoints-only for now).

parakeet — ASR via Shadowfita/parakeet-tdt-0.6b-v2-fastapi:
  - docker buildx git context pinned to SHA 31c5652; no source
    vendored. Rebuild on SHA bump.
  - GPU-capable FastAPI + Silero VAD + WS streaming.
  - API: POST /transcribe, WS /ws/transcribe, GET /healthz. Not the
    literal OpenAI `/v1/audio/transcriptions` path — note in README.
  - HF cache at /worktank/parakeet/models/ (excluded from restic).
  - Build ~158s first time; steady-state start ~40s.

cosyvoice — TTS via neosun/cosyvoice:v1.3.2 shipping
Fun-CosyVoice3-0.5B-2512 (CosyVoice 3, chosen over v2 for the
expanded 5,000-hour instruction-following data covering emotions,
speed, tones, dialects, accents, role-playing; ~150ms streaming
TTFB matches v2). API: /v1/audio/speech (OpenAI drop-in),
/v1/voices/create (cloning), /health.
  - Host port 8190 (container 8188; host 8188 already taken by comfyui).
  - /worktank/cosyvoice/{voices,input,output}/; voices include in
    restic (precious — reproducing a clone needs the original ref
    audio), input+output excluded (scratch).
  - Model weights (~2-3 GB) live inside image layer; re-download on
    tag bump, persist across `compose up -d`.

Both healthy on first deploy.
2026-04-23 23:40:36 -07:00

43 lines
1.7 KiB
Bash

# CosyVoice stack tunables. Copy to `.env` on irv-ml1 before deploying.
#
# cp .env.example .env
# # edit as needed
# docker compose up -d
# Image tag. `v1.3.2` (2026-01-18) is the latest wrapper and ships
# Fun-CosyVoice3-0.5B-2512 (CosyVoice 3 model). The older `v3.x`
# tag family (2025-12-18) also ships CosyVoice 3 — the wrapper
# version numbering diverged from the model version, which is
# confusing but deliberate upstream. Stay on v1.3.x.
#
# See https://hub.docker.com/r/neosun/cosyvoice/tags for updates.
COSYVOICE_VERSION=v1.3.2
# Host port for the web UI + REST API (container listens on 8188).
# Avoiding 8188 on the host since ComfyUI already has it.
COSYVOICE_PORT=8190
# Bind address. 0.0.0.0 exposes on all interfaces including the WG
# tunnel IP (10.100.79.3). Use 127.0.0.1 to restrict to local-only.
COSYVOICE_BIND=0.0.0.0
# Path inside the container for the active model. The image places
# Fun-CosyVoice3-0.5B at pretrained_models/Fun-CosyVoice3-0.5B on
# first run — keep this default unless upstream ships alternate
# model variants.
COSYVOICE_MODEL_DIR=pretrained_models/Fun-CosyVoice3-0.5B
# Seconds of idleness before the server releases GPU VRAM. Reloading
# takes a few seconds; trade off fast re-use vs sharing GPUs with
# other workloads (llama-swap style). Default 600 (10 min).
COSYVOICE_GPU_IDLE_TIMEOUT=600
# Host paths for persistent data. Must exist and be writable by the
# container before first `up`.
# voices/ cloned speaker profiles — precious, restic-covered
# input/ uploaded source audio — scratch
# output/ synthesized clips — scratch, regenerable
COSYVOICE_VOICES_DIR=/worktank/cosyvoice/voices
COSYVOICE_INPUT_DIR=/worktank/cosyvoice/input
COSYVOICE_OUTPUT_DIR=/worktank/cosyvoice/output