# IndexTTS-2 stack tunables. Copy to `.env` on irv-ml1 before deploying.

# ── build pin ────────────────────────────────────────────────────────
# SHA of index-tts/index-tts to build from. Bump + rebuild when you want
# upstream wrapper updates.
INDEX_TTS_SHA=830f6f8f94a51fea23ab1d639027a86200075a4e

# Local image tag — bump when you change build context (Dockerfile,
# app.py, entrypoint.sh) to force a fresh layer build. v2 = wrapper
# 0.2.0 with the streaming endpoint.
INDEX_TTS_TAG=v2

# ── network ──────────────────────────────────────────────────────────
# Host port. Container listens on 8000 internally.
# Reserved on irv-ml1: 8188 ComfyUI, 8190 CosyVoice, 8191 Qwen3-TTS,
# 8765 Parakeet. 8192 is open.
INDEX_TTS_PORT=8192

# Bind address. 0.0.0.0 exposes on all interfaces (incl. WG tunnel
# interface 10.100.79.3); 127.0.0.1 restricts to local-only.
INDEX_TTS_BIND=0.0.0.0

# ── runtime / GPU ────────────────────────────────────────────────────
# bf16/fp16 vs fp32. Empty = fp32. "1" = fp16. IndexTTS-2 README
# recommends fp16; ~6-10 GB VRAM at fp16, double at fp32.
INDEX_TTS_FP16=1

# GPU pinning. Empty = let IndexTTS auto-pick (cuda:0). Set to "cuda:1"
# to pin to the second GPU (irv-ml1's RTX 3090 vs RTX A6000).
INDEX_TTS_DEVICE=

# Devices visible inside the container. Either "all" (both GPUs) or a
# comma-separated list of indices (e.g. "1" to expose only the second
# card). The DEVICE setting above further restricts within those.
INDEX_TTS_GPU_DEVICES=all

# Logging level for the wrapper itself (IndexTTS internals are noisier
# regardless).
INDEX_TTS_LOG_LEVEL=INFO

# ── persistent storage on the host ───────────────────────────────────
# Model weights (~5-7 GB after first run). Bind-mounted so model state
# survives container recreate. Excluded from restic (regenerable from HF).
INDEX_TTS_CACHE_DIR=/worktank/index-tts/cache

# Voice library — flat dir of <name>.wav files (timbre references).
# Cloned voices need the original reference audio to recreate; included
# in restic.
INDEX_TTS_VOICES_DIR=/worktank/index-tts/voices

# Emotion library — flat dir of <name>.wav files (emotion references,
# typically short clips with strong affect). Optional — without any
# entries here you can still use emotion_vector or emotion_text.
INDEX_TTS_EMOTIONS_DIR=/worktank/index-tts/emotions
