reaktor2: init say

This commit is contained in:
lassulus 2022-11-28 00:20:34 +01:00
parent bc658b3eb5
commit 85dd8bb9a5

View File

@ -98,6 +98,30 @@ let
}; };
}; };
say = {
pattern = "^!say (.*)$";
activate = "match";
arguments = [1];
command = {
filename = pkgs.writeDash "say" ''
set -efu
export PATH=${makeBinPath [
pkgs.coreutils
pkgs.curl
pkgs.opusTools
]}
paste_url=$(printf '%s' "$1" |
curl -fSsG http://tts.r/api/tts --data-urlencode 'text@-' |
opusenc - - |
curl -Ss https://p.krebsco.de --data-binary @- |
tail -1
)
echo "$_from: $paste_url"
'';
};
};
taskRcFile = builtins.toFile "taskrc" '' taskRcFile = builtins.toFile "taskrc" ''
confirmation=no confirmation=no
''; '';
@ -273,6 +297,7 @@ let
bedger-add bedger-add
bedger-balance bedger-balance
hooks.sed hooks.sed
say
(generators.command_hook { (generators.command_hook {
inherit (commands) dance random-emoji nixos-version; inherit (commands) dance random-emoji nixos-version;
tell = { tell = {