fixup! feat(speech): the speech capability over Cap'n Web, behind a gate
check / check (push) Canceled after 0s

This commit is contained in:
dckc committed 2026-12-02 15:41:18 -06:00
1 parent 372f6a2b96
commit a97ba6c174
12 files changed
+245 -92

No files matched your search

+4 -2
View File
@@ -1,9 +1,11 @@
#!/bin/sh
# speak.sh VOICE: text on stdin, piper's WAV of it on stdout. VOICE is an .onnx with its .onnx.json beside it.
# 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; }
@piper@/bin/piper -m "$voice" "$@" -f "$tmp/out.wav" 2>"$tmp/err" || { cat "$tmp/err" >&2; exit 1; }
cat "$tmp/out.wav"