ti-pote/apps/robot-client/.env.example
2026-04-08 18:37:08 +02:00

76 lines
2.5 KiB
Plaintext

# ──────────────────────────────────────────────
# Ti-Pote Robot Client — Configuration
# ──────────────────────────────────────────────
# Mode: 'physical' (Raspberry Pi prod) | 'dev' (Pi + USB audio test) | 'simulator' (PC dev)
ROBOT_MODE=physical
# Trigger mode: 'wakeword' (OpenWakeWord) | 'keyboard' (press Enter = wake word)
TRIGGER_MODE=wakeword
# Device identification (set during first setup or manually)
DEVICE_ID=
DEVICE_TOKEN=
# Cloud backend URL
CLOUD_URL=ws://localhost:3000
# Robot name
ROBOT_NAME=Ti-Pote
# Log level: fatal, error, warn, info, debug, trace
LOG_LEVEL=info
# ── Audio (ALSA) ──
# ALSA device for microphone capture
# Examples: 'default', 'plughw:1,0', 'hw:1,0'
# Use 'arecord -l' to list available devices
AUDIO_CAPTURE_DEVICE=default
# ALSA device for speaker playback
# Examples: 'default', 'plughw:0,0', 'hw:0,0'
# Use 'aplay -l' to list available devices
AUDIO_PLAYBACK_DEVICE=default
# Audio sample rate in Hz (must match backend: 16000)
AUDIO_SAMPLE_RATE=16000
# Audio chunk duration in ms (how often chunks are sent to cloud)
AUDIO_CHUNK_MS=100
# ── Wake Word ──
# Path to the Python binary (use venv python if openwakeword is in a virtualenv)
# Examples: 'python3', '/home/pi/.tipote-venv/bin/python3'
WAKEWORD_PYTHON_PATH=python3
# Path to the OpenWakeWord Python script
WAKEWORD_SCRIPT_PATH=./scripts/wake_word.py
# Wake word model name (use 'hey_jarvis' as placeholder until custom model is trained)
WAKEWORD_MODEL=hey_jarvis
# Wake word detection threshold (0.0 to 1.0, higher = less false positives)
WAKEWORD_THRESHOLD=0.5
# ── Hardware bridge (ESP32 firmware over UART) ──
# Enable the serial link to the ESP32 running apps/robot-hardware.
# When false, the robot-client runs headless (no eyes / no face).
HARDWARE_SERIAL_ENABLED=false
# Serial device path.
# Dev (ESP32 plugged into laptop): /dev/ttyUSB0 or /dev/ttyACM0 (Linux),
# /dev/tty.usbserial-XXXX (macOS),
# COM3 (Windows).
# Prod (Pi → ESP32 UART): /dev/serial0 or /dev/ttyAMA0
HARDWARE_SERIAL_PORT=/dev/ttyUSB0
# Must match HW_SERIAL_BAUD in apps/robot-hardware/platformio.ini
HARDWARE_SERIAL_BAUD=921600
# Heartbeat interval (ms). The firmware falls back to a SLEEPY
# animation if it stops hearing from us for ~5s (HW_HEARTBEAT_TIMEOUT_MS).
HARDWARE_HEARTBEAT_MS=1000