diff options
author | tv <tv@krebsco.de> | 2022-11-29 19:54:28 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2022-11-29 19:54:28 +0100 |
commit | 43428ccca56bdf10572f1c93ebafa82cfdf7dbf5 (patch) | |
tree | b6c79e4f047ccb8842c9e5f7b73688ccbc5ff053 /krebs/2configs/reaktor2.nix | |
parent | 5c05e2a9b68b01e1f0f69a1e4414bce21a801f1f (diff) | |
parent | 32b23666d15861f6f4d8b1f522ee53d4f21fabb6 (diff) |
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'krebs/2configs/reaktor2.nix')
-rw-r--r-- | krebs/2configs/reaktor2.nix | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index c1af2d8b4..13b59fa82 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -62,7 +62,6 @@ let export PATH=${makeBinPath [ pkgs.coreutils pkgs.curl - pkgs.gnused pkgs.stable-generate ]} stable_url=$(stable-generate "$@") @@ -85,7 +84,6 @@ let export PATH=${makeBinPath [ pkgs.coreutils pkgs.curl - pkgs.gnused pkgs.stable-generate ]} case $_msgtarget in \#*) @@ -100,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" '' confirmation=no ''; @@ -275,6 +297,7 @@ let bedger-add bedger-balance hooks.sed + say (generators.command_hook { inherit (commands) dance random-emoji nixos-version; tell = { |