# Where the server listens; the CLI's --host / --port override these. # Loopback by default. 0.0.0.0 lets other devices on your network (a phone) # open the captions, and use your API keys. Port 0 picks a free one. # LIVESUB_HOST=127.0.0.1 # LIVESUB_PORT=8000 # Behind a reverse proxy, the public hostname(s) it is reached by: # LIVESUB_ALLOWED_HOSTS=captions.example.com # At least ONE ASR backend must be configured for the server to accept # sessions: a cloud key (DASHSCOPE_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY) # OR a local binary (QWEN_ASR_BIN, VOXTRAL_BIN). Backends without their # key / binary are hidden in the UI dropdown. # Optional: Qwen-ASR local backend. Recommended local ASR — lightweight # and uniquely handles transcription over background music. Two model # sizes run on the same binary; each downloaded one shows up as its own # UI option: # "Qwen (small, local)" — 0.6B, faster, lighter # "Qwen (large, local)" — 1.7B, more accurate, heavier on RAM # The prebuilt binary comes with `npm install` (the qwen-asr package) on # macOS, Linux and Windows. To use your own build of https://github.com/nexustar/qwen-asr: # QWEN_ASR_BIN=/abs/path/to/qwen-asr/qwen_asr # Models are downloaded in Settings → Backends into the data dir # (macOS ~/Library/Application Support/livesub, Linux ~/.local/share/livesub, # Windows %LOCALAPPDATA%\livesub). Override the location: # LIVESUB_DATA_DIR=/abs/path/to/livesub-data # Download from a Hugging Face mirror instead of huggingface.co: # HF_ENDPOINT=https://hf-mirror.com # Local translation models come from Firefox's CDN; a mirror with the same # paths can stand in: # MT_ENDPOINT=https://firefox-settings-attachments.cdn.mozilla.net # Or use model dirs you already have (livesub won't download or delete them): # QWEN_ASR_MODEL_DIR_SMALL=/abs/path/to/qwen-asr/qwen3-asr-0.6b # QWEN_ASR_MODEL_DIR_LARGE=/abs/path/to/qwen-asr/qwen3-asr-1.7b # Optional: Voxtral local ASR (larger / more accurate than Qwen-0.6B, # multilingual auto-detect; ~2.5x realtime on Apple M3 Max). Higher-quality # local alternative for powerful machines. # Build https://github.com/antirez/voxtral.c # VOXTRAL_BIN=/abs/path/to/voxtral.c/voxtral # VOXTRAL_MODEL_DIR=/abs/path/to/voxtral.c/voxtral-realtime-4b # VOXTRAL_INTERVAL_SEC=2.0 # Optional: DashScope cloud Qwen3-ASR-Flash-Realtime (Alibaba's hosted # Qwen ASR, 16kHz native, server VAD, CJK-tuned, ~$0.005/min intl / # $0.003/min China). Best cloud ASR for content with background music. # Required when picking "Qwen ASR (Cloud)" as the ASR backend in the UI. # DASHSCOPE_API_KEY=sk-... # DASHSCOPE_BASE_URL=wss://dashscope-intl.aliyuncs.com/api-ws/v1/realtime # ↑ default; override to wss://dashscope.aliyuncs.com/api-ws/v1/realtime # for the mainland-China region. # DASHSCOPE_REALTIME_MODEL=qwen3-asr-flash-realtime # Server VAD threshold (0.0-1.0; lower = catch quieter speech but more # noise-triggered hallucinations). Default 0.5 (Alibaba documents 0.2); # tune per environment. # DASHSCOPE_VAD_THRESHOLD=0.5 # Optional: OpenAI Realtime ASR (gpt-realtime-whisper, server VAD, true # token-level streaming, ~$0.017/min). Best cloud ASR for voice-dominant # content (podcasts, talks, interviews). Required when picking # "OpenAI Realtime" as the ASR backend in the UI, or for any openai-SDK # translate backend defined in livesub.toml that uses OPENAI_API_KEY. # OPENAI_API_KEY=sk-... # OPENAI_REALTIME_MODEL=gpt-realtime-whisper # Optional: DeepSeek as translation backend. Cheapest practical # translation; uses the anthropic-compatible endpoint, so the same SDK as # Claude with a different base_url + api_key. # DEEPSEEK_API_KEY=sk-... # DEEPSEEK_BASE_URL=https://api.deepseek.com/anthropic # DEEPSEEK_TRANSLATE_MODEL=deepseek-flash # Optional: Claude as translation backend (highest translation quality) # and fallback for /api/hints (scene-seed → glossary research) when no # GEMINI_API_KEY is set. Required for "Claude Haiku / Sonnet" in # the UI translate dropdown. # ANTHROPIC_API_KEY=sk-ant-... # Optional: custom translate backends (local LLMs, routing services, etc.) # live in livesub.toml — see livesub.toml.example. # Optional: Gemini as ASR (Gemini Live), translation backend, and the # DEFAULT backend for /api/hints (google_search grounding has the best # long-tail coverage for concrete events/names). # GEMINI_API_KEY=your_key_here # Optional model overrides # GEMINI_ASR_MODEL=gemini-3.5-transcribe-live # GEMINI_TRANSLATE_MODEL=gemini-3.1-flash-lite # Optional: hint generation (Settings → Topic for research → ✨ Research). # Defaults to Gemini if GEMINI_API_KEY is set, else Claude. Set to # "claude" to force Claude even when both keys are present, or "gemini" # to fail loudly when GEMINI_API_KEY isn't set instead of falling back. # HINTS_BACKEND=auto # HINTS_GEMINI_MODEL=gemini-2.5-flash # HINTS_CLAUDE_MODEL=claude-sonnet-5-5 # Optional: LOG_LEVEL=debug also logs each translation request (wait, # duration, how many run at once). # LOG_LEVEL=info