Files
home-voice-assistant/.env.example
Cosmo e4e7529063 feat(notifier): push state events to Smart Home Tablet overlay
Adds a thin HTTP bridge so the tablet at https://tablet.digital-home.site
shows a Siri-style overlay reflecting the current assistant state
(wake / command / response / idle / error). Non-fatal: if the tablet
is offline or TABLET_URL/VOICE_API_KEY are unset, events are silently
skipped and the assistant keeps working.

- satellite/notifier.py — POST /api/voice/event with bearer token,
  reused requests.Session for keep-alive, 1.5s timeout
- satellite/modes.py — emits wake on activation, command after STT,
  response after LLM, idle on timeout
- satellite/llm.py — emits error on gateway connection/timeout/HTTP
- .env.example documents TABLET_URL and VOICE_API_KEY

Tablet side (separate repo smart-home-tablet, commit 51c3d60) exposes
POST /api/voice/event + GET /api/voice/stream (SSE) and renders a
full-screen overlay in components/VoiceOverlay.tsx.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 12:43:01 +00:00

57 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# OpenClaw Gateway — Cosmo
# Роутинг к агенту идёт через COSMO_SESSION_KEY, отдельный AGENT не нужен.
GATEWAY_URL=http://192.168.31.103:18789
GATEWAY_TOKEN=your_openclaw_token_here
VOICE_MODEL=openai/gpt-5.4-mini
# OpenClaw Gateway — Люся
LUSYA_GATEWAY_URL=http://192.168.31.103:18790
LUSYA_GATEWAY_TOKEN=your_openclaw_token_here
LUSYA_VOICE_MODEL=openai/gpt-5.4-mini
# STT (Groq)
GROQ_API_KEY=your_groq_api_key_here
# Wake word (openwakeword .onnx модели, обучаются через training/step_4.py)
WAKE_WORD_COSMO=data/models/cosmo.onnx
WAKE_WORD_LUSYA=data/models/lusya.onnx
# Audio (на Pi: bluez_sink.XX_XX_XX_XX_XX_XX.a2dp_sink)
AUDIO_SINK=
# TTS (ElevenLabs)
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
ELEVENLABS_MODEL=eleven_turbo_v2_5
COSMO_TTS_VOICE=your_cosmo_voice_id
LUSYA_TTS_VOICE=your_lusya_voice_id
# VAD
SILENCE_THRESHOLD=500
SILENCE_DURATION=1.5
MAX_DURATION=15
FOLLOWUP_TIMEOUT=8
VAD_AGGRESSIVENESS=2 # webrtcvad 0..3, больше = строже
# LLM
VOICE_MAX_TOKENS=300
LLM_RETRIES=3
# Barge-in (прерывание TTS голосом). Работает только при разнесённых мике/колонке
# или в наушниках — иначе собственный TTS будет триггерить прерывание.
BARGE_IN_ENABLED=false
BARGE_IN_THRESHOLD=1500 # RMS выше SILENCE_THRESHOLD
BARGE_IN_WARMUP=0.8 # сек пропуска в начале TTS
# Логирование
LOG_FILE=errors.log
COSMO_SESSION_KEY=agent:voice:voice:home
LUSYA_SESSION_KEY=agent:wife:voice:home
# Smart Home Tablet integration (опционально)
# Если настроено — скрипт шлёт события состояния (wake/command/response/idle/error)
# на планшет, который показывает оверлей с Siri-blob + распознанным текстом.
# Если не настроено, просто пропускается, ассистент работает как раньше.
TABLET_URL=https://tablet.digital-home.site
VOICE_API_KEY=your_voice_api_key_here