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:
@@ -0,0 +1,35 @@
|
||||
# systemd unit for the Hermeven bridge. Example only: it has not been run on a droplet yet.
|
||||
# Install: copy to /etc/systemd/system/, adjust paths, then
|
||||
# systemctl daemon-reload && systemctl enable --now hermeven-bridge
|
||||
[Unit]
|
||||
Description=Hermeven bridge
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=hermeven
|
||||
Group=hermeven
|
||||
WorkingDirectory=/opt/hermeven
|
||||
# Secrets live here, mode 600, owned by the service user. Never in the repository.
|
||||
Environment=HERMEVEN_ENV_FILE=/etc/hermeven/bridge.env
|
||||
ExecStart=/usr/bin/npm run --silent bridge
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
# In-flight turns are recovered from SQLite on the next start.
|
||||
TimeoutStopSec=20
|
||||
|
||||
# Hardening
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/var/lib/hermeven
|
||||
ProtectKernelTunables=true
|
||||
ProtectControlGroups=true
|
||||
RestrictSUIDSGID=true
|
||||
# The speech model needs roughly 0.8 GB resident; leave headroom.
|
||||
MemoryMax=1500M
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user