# NyxClaw - Environment Variables # Copy this file to .env and fill in your values # ============================================================================= # Core — Which backend and voice pipeline to use # ============================================================================= AGENT_TYPE=openclaw # Which AI backend: "openclaw" or "zeroclaw" VOICE_MODE=openai # Voice pipeline: "openai" (cloud STT+TTS) or "local" (Piper+Whisper on CPU) # ============================================================================= # Backend Connection — Both OpenClaw and ZeroClaw # ============================================================================= BASE_URL= # URL of your Claw backend (OpenClaw default port: 18789, ZeroClaw: 42617) AUTH_TOKEN= # Auth token for the backend # OpenClaw: same value as OPENCLAW_GATEWAY_TOKEN in OpenClaw's .env # ZeroClaw: pairing token from `zeroclaw gateway get-paircode --new` # ============================================================================= # Rich Content (Avatar Patch) — Both OpenClaw and ZeroClaw # Requires the avatar patch applied to your backend. See claw_patches/ READMEs. # Without the patch, all LLM output is treated as speech (no rich_content messages). # ============================================================================= USE_AVATAR_ENDPOINT=false # Set to "true" after applying the avatar patch to your backend # OpenClaw: uses /v1/chat/completions/avatar (HTTP SSE) # ZeroClaw: uses /ws/avatar (WebSocket) — automatic, no extra config needed # ============================================================================= # OpenClaw-Only Settings — Ignored when AGENT_TYPE=zeroclaw # ============================================================================= AGENT_MODEL=openclaw:main # Agent routing key sent in the API request body AVATAR_ENDPOINT=/v1/chat/completions/avatar # HTTP SSE avatar endpoint path (only change if you customised it) SESSION_KEY= # Session routing key (leave empty for auto-assignment) AGENT_ID= # Target a specific agent ID (leave empty for default agent) MAX_RETRIES=2 # Max retries on failed LLM requests THINKING_MODE=minimal # LLM thinking depth: off, minimal, default USER_ID= # Stable user ID for session continuity (defaults to device_id if unset) # ============================================================================= # OpenAI Voice (VOICE_MODE=openai) — Cloud STT + TTS via OpenAI APIs # Uses OpenAI Realtime API for VAD+STT and OpenAI TTS API for speech. # The LLM itself still runs on your Claw backend (BASE_URL above). # ============================================================================= OPENAI_API_KEY= # Required — your OpenAI API key OPENAI_REALTIME_MODEL=gpt-realtime # Realtime API model for VAD + STT OPENAI_VAD_TYPE=semantic_vad # VAD type: "semantic_vad" or "server_vad" OPENAI_TRANSCRIPTION_MODEL=gpt-4o-transcribe # Transcription model OPENAI_TRANSCRIPTION_LANGUAGE=en # Transcription language code OPENAI_TRANSCRIPTION_PROMPT= # Vocabulary hint for proper nouns (e.g. "Nyx, ZeroClaw, OpenClaw") OPENAI_TTS_MODEL=tts-1 # TTS model: "tts-1" or "tts-1-hd" OPENAI_VOICE=alloy # TTS voice: alloy, echo, fable, onyx, nova, shimmer OPENAI_TTS_SPEED=1.0 # TTS speed: 0.25 to 4.0 # ============================================================================= # Local Voice STT (VOICE_MODE=local) — On-device speech recognition # Requires: uv sync --extra local_voice (or INSTALL_LOCAL_VOICE=true for Docker) # ============================================================================= STT_ENABLED=true # Enable speech-to-text STT_MODEL=small.en # faster-whisper model: tiny.en, base.en, small.en, medium.en STT_VAD_START_THRESHOLD=0.60 # Silero VAD: speech start confidence (0-1) STT_VAD_END_THRESHOLD=0.35 # Silero VAD: speech end confidence (0-1) STT_VAD_MIN_SILENCE_MS=280 # Minimum silence (ms) before end-of-speech STT_INITIAL_PROMPT= # Primes Whisper with words it might mishear (names, jargon, short commands) # ============================================================================= # Local Voice TTS (VOICE_MODE=local) — On-device speech synthesis # Requires: uv sync --extra local_voice (or INSTALL_LOCAL_VOICE=true for Docker) # ============================================================================= TTS_ENABLED=true # Enable text-to-speech TTS_ONNX_MODEL_DIR=./pretrained_models/piper # Piper ONNX model directory TTS_VOICE_NAME=en_US-hfc_female-medium # Piper voice name TTS_VOICE_PATH= # Path to WAV file for voice cloning (optional) TTS_NOISE_SCALE=0.75 # Audio variation: 0=flat, 1=expressive TTS_NOISE_W_SCALE=0.8 # Phoneme duration variation: 0=robotic, 1=natural TTS_LENGTH_SCALE=0.95 # Speech speed: <1=faster, >1=slower # ============================================================================= # Server # ============================================================================= ASSISTANT_INSTRUCTIONS=You are a helpful and friendly AI assistant. Be concise in your responses. # Fallback system prompt (backends with AGENTS.md override this) ONNX_MODEL_PATH=./pretrained_models/wav2arkit/wav2arkit_cpu.onnx # Wav2Arkit blendshape model SERVER_HOST=0.0.0.0 SERVER_PORT=8080 DEBUG=false # INSTALL_LOCAL_VOICE=false # Docker only: set true before `docker compose build` to include local voice deps # ============================================================================= # Client Authentication — NyxClaw ↔ Mobile App (not backend auth) # ============================================================================= AUTH_ENABLED=false # Enable device auth for mobile clients connecting to NyxClaw AUTH_ENABLE_RATE_LIMITING=true # Rate-limit auth endpoints # AUTH_SETUP_CODE_URL= # Auto-set by Cloudflare Tunnel. Only set manually if using your own tunnel/domain. AUTH_STORE_PATH=./data/auth_store.json # Where paired device tokens are stored AUTH_REGENERATE_SETUP_CODE=false # Set true + restart to force a new setup code