# Copy to .env and fill in. Loaded by docker-compose; for local runs, `export` # these (or `set -a; source .env; set +a`) before `uv run python server.py`. # --- Required --- # Postgres voice store. Use a session-mode connection (Supabase "Session pooler" # or a direct connection) and include ?sslmode=require. DATABASE_URL=postgresql://USER:PASSWORD@HOST:5432/postgres?sslmode=require # Hugging Face token with access to the gated model (needed on first run to # download MODEL_PATH from config.py). HF_TOKEN=hf_xxx # --- Optional runtime tunables (defaults in config.py) --- # Every value below is read at startup; change it here and restart the container # (no image rebuild). Anything NOT listed here is a locked, checkpoint-intrinsic # constant and must not be changed without retraining. # Model to serve: any HF repo id or local path. Set this to serve a finetune # (default is the base checkpoint). # TTS_MODEL_PATH=nineninesix/kani3-dpo-cfg-round-2 # TTS_CODEC_MODEL=nvidia/nemo-nano-codec-22khz-1.89kbps-21.5fps # must match training # GPU / serving (tune per machine + load) # TTS_GPU_MEMORY_UTILIZATION=0.82 # vLLM VRAM fraction; lower on smaller GPUs # TTS_MAX_NUM_SEQS=256 # max concurrent streams # TTS_CODEC_MAX_DECODE_BATCH=32 # codec decode batch cap (memory vs throughput) # Streaming granularity / latency # TTS_CHUNK_SIZE=86 # frames per steady-state codec decode # TTS_STREAM_FETCH_EVERY=86 # frames per worker poll (keep aligned with CHUNK_SIZE) # TTS_FIRST_CHUNK_FRAMES=10 # smaller -> lower TTFB # TTS_LOOKBACK_FRAMES=8 # frames of prior context for continuity # Generation # TTS_TEMPERATURE=0.3 # applied to all 32 heads uniformly # TTS_TOP_P=0.95 # TTS_MAX_TOKENS=1000 # max frames (~ minutes of audio) # TTS_STOP_THRESHOLD=0.5 # Output tail shaping (anti-click) # TTS_END_OF_SPEECH_FADE_MS=0.0 # TTS_END_OF_SPEECH_SILENCE_MS=0.0