fixup! feat(speech): the speech capability over Cap'n Web, behind a gate
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
This commit is contained in:
1 parent
372f6a2b96
commit
a97ba6c174
12 files changed
+245
-92
No files matched your search
+3
-2
@@ -1,5 +1,5 @@
|
||||
# The speech server and clients, with node, and the sox, whisper, and piper the server's scripts use.
|
||||
# bin/speech-server HOST PORT MODEL VOICE
|
||||
# bin/speech-server HOST PORT MODEL VOICE [PIPER_OPTION...]
|
||||
# bin/hear-client URL < clip.wav
|
||||
# bin/speak-client URL < text > speech.wav
|
||||
{ callPackage, runCommand, nodejs-slim, sox, whisper-cpp, piper-tts }:
|
||||
@@ -14,7 +14,8 @@ runCommand "pdtv26-speech" { } ''
|
||||
chmod +x $out/bin/hear.sh $out/bin/speak.sh
|
||||
cat > $out/bin/speech-server <<EOF
|
||||
#!/bin/sh
|
||||
exec ${nodejs-slim}/bin/node ${dir}/server.js "\$1" "\$2" $out/bin/hear.sh "\$3" $out/bin/speak.sh "\$4"
|
||||
host=\$1 port=\$2 model=\$3 voice=\$4; shift 4
|
||||
exec ${nodejs-slim}/bin/node ${dir}/server.js "\$host" "\$port" $out/bin/hear.sh "\$model" $out/bin/speak.sh "\$voice" "\$@"
|
||||
EOF
|
||||
for c in hear-client speak-client; do
|
||||
printf '#!/bin/sh\nexec %s %s/%s.js "$@"\n' ${nodejs-slim}/bin/node ${dir} $c > $out/bin/$c
|
||||
|
||||
Reference in new issue
Block a user