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
4036bfc936
commit
66e084afc7
20 files changed
+621
No files matched your search
@@ -0,0 +1,31 @@
|
||||
# pdtv26-speech: the speech capability's JavaScript, and its clients.
|
||||
# npm runs here, in Nix's build sandbox, from package-lock.json; so do the tests.
|
||||
# The output is plain JavaScript, the same on every architecture (allowedReferences keeps it so):
|
||||
# each user supplies its own node, at lib/node_modules/pdtv26-speech/*.js.
|
||||
{ lib, buildNpmPackage }:
|
||||
buildNpmPackage {
|
||||
pname = "pdtv26-speech";
|
||||
version = "0.1.0";
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./package.json ./package-lock.json ./run.js
|
||||
./gate.js ./gate.test.js ./speech.js ./speech.test.js
|
||||
./server.js ./hear-client.js ./speak-client.js
|
||||
];
|
||||
};
|
||||
npmDepsHash = "sha256-C7Em37Mm3+mUHqQ2n37JshgLCByzMOlhgoQEex3CnlU=";
|
||||
dontNpmBuild = true;
|
||||
# The scripts' #!/usr/bin/env node stays as is: patched, it would tie the package to one node.
|
||||
dontPatchShebangs = true;
|
||||
npmInstallFlags = [ "--ignore-scripts" ];
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
# Every file parses, the server and clients included: no test imports them.
|
||||
for f in *.js; do node --check "$f"; done
|
||||
node --test
|
||||
runHook postCheck
|
||||
'';
|
||||
allowedReferences = [ ];
|
||||
}
|
||||
Reference in new issue
Block a user