# Copy to .env and edit. Do not commit your real .env (git-ignored). # --- Bind address (the app connects here: wss://:) --- HOST=0.0.0.0 PORT=8080 # --- LLM (the brain) via Ollama's OpenAI-compatible endpoint --- OLLAMA_BASE_URL=http://localhost:11434/v1 # Brain (swappable — the host owns the model, no app change to switch). The LLM dominates turn latency. # qwen3.5:27b (~17GB) is the default: qwen3.5:9b fakes actions and misses portal.end_conversation. # Run Ollama with OLLAMA_KEEP_ALIVE=-1 so the first turn isn't a cold reload. OLLAMA_MODEL=qwen3.5:27b # Cap model output length (reasoning is off, so this is spoken text and tool calls only). 128 is too # low when 20+ portal/external tools are registered (the turn ends with no tool_call and no speech). # 1024 is a safe default for tool turns; spoken replies stay short via the system prompt. OLLAMA_MAX_TOKENS=1024 # Return only Tavily's synthesized answer (skip page snippets) to shrink the post-search LLM prefill. WEB_SEARCH_ANSWER_ONLY=true # Preload the model in the background at boot (cuts first-turn cold-start latency). WARM_OLLAMA_AT_STARTUP=true # Pre-synthesize one Kokoro phrase at boot (cuts first-turn TTS TTFB). WARM_KOKORO_AT_STARTUP=true # Prime web_search at boot (Tavily connection / DuckDuckGo path). WARM_TAVILY_AT_STARTUP=true # Load Whisper weights into MLX at boot (cuts first-turn ASR cold-start latency). WARM_WHISPER_AT_STARTUP=true # --- ASR (Whisper on MLX, Apple Silicon) --- WHISPER_MODEL=mlx-community/whisper-large-v3-turbo # latency pick; mlx-community/whisper-large-v3 for max accuracy # --- TTS --- KOKORO_VOICE=af_heart # any installed Kokoro voice # --- Web search grounding (host-side tool; weather uses Open-Meteo via get_weather) --- # Backend: tavily (default, needs API key) or duckduckgo (free, no key). WEB_SEARCH_BACKEND=tavily TAVILY_API_KEY=tvly-xxxxxxxxxxxxxxxxxxxx # --- Audio contract (must match the app: 16k mono in / 24k mono out). Change only if you know why. --- INPUT_SAMPLE_RATE=16000 OUTPUT_SAMPLE_RATE=24000 # Silero VAD: seconds of silence before the host ends your turn (Pipecat default is 0.2). # Raise if the host jumps in during short pauses or clips your last word; lower if it feels sluggish. VAD_STOP_SECS=0.8