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.
This commit is contained in:
vh
2026-04-23 23:40:36 -07:00
parent 06476745f1
commit 1a67370138
6 changed files with 410 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
# Parakeet ASR stack tunables. Copy to `.env` on irv-ml1 before deploying.
#
# cp .env.example .env
# # edit as needed
# docker compose build
# docker compose up -d
# Pinned git SHA to build from. Bump + rebuild when you want upstream
# fixes. `main` latest as of 2026-04:
# https://github.com/Shadowfita/parakeet-tdt-0.6b-v2-fastapi
PARAKEET_SHA=31c5652b62d09653ad5ea8190c0ad0d35394174d
# Host port for the FastAPI server (container listens on 8000)
PARAKEET_PORT=8765
# 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.
PARAKEET_BIND=0.0.0.0
# Host path for the HuggingFace cache (parakeet-tdt-0.6b-v2 weights
# ~2.5 GB). Persistent across container recreates. Must exist before
# first `up` with ownership matching the container user (root inside
# this image — no UID juggling needed, but the host dir needs to be
# writable by the container).
PARAKEET_MODELS_DIR=/worktank/parakeet/models
# Inference precision. fp16 halves VRAM and is lossless for parakeet
# in practice; use fp32 only if fp16 shows degraded WER for your
# domain audio.
PARAKEET_MODEL_PRECISION=fp16
# Batch size for the transcribe queue. Larger = better throughput
# under load at the cost of per-request latency.
PARAKEET_BATCH_SIZE=4
# Max single-clip duration (seconds). Longer inputs get rejected
# by the server with 400. Upstream default.
PARAKEET_MAX_AUDIO_DURATION=30
# Silero VAD threshold (0–1). Higher = stricter about what counts
# as speech (fewer false wake-ups on silence, more chance of clipping
# soft speech). 0.5 is upstream default.
PARAKEET_VAD_THRESHOLD=0.5
# End-to-end processing timeout per request (seconds).
PARAKEET_PROCESSING_TIMEOUT=60
# Log level: DEBUG | INFO | WARNING | ERROR
PARAKEET_LOG_LEVEL=INFO