feat(speech): the speech capability over Cap'n Web, behind a gate
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
The agent's ears and voice: a server on the home server transcribes a clip (sox, whisper.cpp) and speaks text (piper), one job at a time. A gate hands the capability to whoever presents its key; the key comes from systemd's credentials, not argv. make test runs the unit tests in Nix's sandbox; make smoke starts a real server on localhost, speaks a phrase, and hears it back. Generated-by: Claude Opus 5.5
This commit is contained in:
1 parent
4a42c896db
commit
2e7156dc36
20 files changed
+621
No files matched your search
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# speak.sh VOICE [PIPER_OPTION...]: text on stdin, piper's WAV of it on stdout.
|
||||
# VOICE is an .onnx with its .onnx.json beside it; options go to piper as they are.
|
||||
# The Nix build fills in @piper@ (server.nix).
|
||||
set -eu
|
||||
voice=$1
|
||||
shift
|
||||
tmp=$(mktemp -d)
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
@piper@/bin/piper -m "$voice" "$@" -f "$tmp/out.wav" 2>"$tmp/err" || { cat "$tmp/err" >&2; exit 1; }
|
||||
cat "$tmp/out.wav"
|
||||
Reference in new issue
Block a user