Build speech-to-text into the bridge; add droplet deployment examples

STT_PROVIDER now defaults to "builtin": Whisper (onnx-community/whisper-base,
q8) runs in the bridge process on the CPU via @huggingface/transformers, so
no provider account is needed and recordings stay on the bridge host. Silent
captures are detected by level before the model runs. The external
OpenAI-compatible adapter remains available.

Tests: 130 unit/integration; 4 scenarios with the real model on a real
speech recording (npm run test:real-stt). Not tested on audio from the
glasses or on a droplet.

deploy/ and docs/deploy-droplet.md are examples that have not been run.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Dan
2026-11-18 18:31:30 -08:00
co-authored by Claude Fable 5.2
parent 3c9e094977
commit 6d74f9e121
29 changed files with 1602 additions and 42 deletions
+4 -2
View File
@@ -1,7 +1,8 @@
# Setup
Requirements: Node.js 22.13 or later, a Hermes install with the API server enabled, and (for
voice) an OpenAI-compatible transcription endpoint.
Requirements: Node.js 22.13 or later and a Hermes install with the API server enabled. Speech
recognition is built into the bridge (Whisper on the CPU, about 0.8 GB of memory); the first
start downloads about 80 MB of model files into `data/models`.
```sh
npm ci
@@ -98,4 +99,5 @@ npm run typecheck
npm test # unit + integration, fakes only
npm run test:simulator # needs a desktop session; opens the simulator window
npm run test:real-hermes # needs the hermes CLI; uses a throwaway HERMES_HOME and a stub model
npm run test:real-stt # runs the built-in Whisper model; first run downloads it
```