feat(voice): server-side LLM/STT — porting Python satellite into tablet
All checks were successful
Deploy / deploy (push) Successful in 5m44s

Шаг 1 миграции голосового стека из home-voice-assistant в сам tablet:

- /api/voice/chat — Claude Haiku 4.5 с tool-loop (max 4 раунда), prompt
  caching на system + старой истории, история в /data/voice-history/.
  Эмитит command/response/error в voice-bus → орб моргает как раньше.
- /api/voice/stt — Groq whisper-large-v3-turbo, multipart или raw audio.
- lib/voice-text.ts — порт clean_for_speech (без pymorphy3, время в
  именительном падеже) и strip_fillers + RESET_PATTERNS.
- lib/voice-executors.ts — tool executors через loopback fetch на
  существующие /api/voice/tools/* и /api/voice/timer.
- Поддержка ANTHROPIC_PROXY/GROQ_PROXY (fallback на HTTPS_PROXY).

После деплоя нужны GROQ_API_KEY и ANTHROPIC_API_KEY в tablet.env.
Шаги 2 (push-to-talk в браузере) и 3 (wake-word) — отдельно.
This commit is contained in:
Cosmo
2026-04-27 08:24:19 +00:00
parent a97dd11f25
commit eeac2eefb3
10 changed files with 1215 additions and 4 deletions

View File

@@ -9,14 +9,17 @@
"lint": "next lint"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.65.0",
"clsx": "^2.1.1",
"framer-motion": "^11.1.7",
"googleapis": "^171.4.0",
"groq-sdk": "^0.36.0",
"https-proxy-agent": "^7.0.6",
"lucide-react": "^0.376.0",
"next": "14.2.3",
"react": "^18",
"react-dom": "^18"
"react-dom": "^18",
"undici": "^7.16.0"
},
"devDependencies": {
"@types/node": "^20",