!!!Perl-Einzeiler

Ausgangspunkt für diese Sammlung ist der Hinweis durch User "Tigran" am 27.09.2025 auf das Buch
["Perl One-Liners Guide"|https://learnbyexample.github.io/learn_perl_oneliners/cover.html] von Sundeep Agarwal im perlweekly-newsletter.

!!Sprachausgabe

Semilong Perl-Oneliner-TTS-Example for alsa-utils and  (https://github.com/rhasspy/piper or "yay -S piper-voices-en-gb" with arch/manjaro-linux), that plays all found voices that contain one speaker and text "there is no business like show-business":

{{{
perl -MFile::Find -E'my $text="There is no business like show business";say $text;find(sub {if (/onnx$/){say $_;open TTS, "|piper-tts -m ".$File::Find::name." -q -f -|aplay -t wav -f S16_LE -r 22050 -c 1 -q";print TTS $text;close TTS}}, "/usr/share/piper-voices")'
}}}

!!Übersetzung auf lokalem Rechner

Here is another oneliner for translating into spanish ("es") with libretranslate as a docker-installation as described in https://docs.libretranslate.com/guides/installation: "mojo" is short for "perl -Mojo [...]":

%%prettify 
{{{
mojo get -M POST -r -H 'Content-Type: application/json' -c '{"q":"There is more than one way to do it","source":"auto","target":"es"}' http://localhost:5000/translate /translatedText
}}}
/%

To hear this with gtts-cli and alsa-utils in arch-linux, you can append:
%%prettify 
{{{
|gtts-cli -s -l es -|play -t mp3 -
}}}
/%

!!Zuhörer

__~ToDo__: Jetzt fehlt nur noch ein Zuhörer z.B. in Form von ["whisper"|https://github.com/appleboy/go-whisper], der dann mit einem Oneliner aufgefordert wird, Offline-Smarthome-Kommandozentrale per Sprache zu werden.
So wie es heute schon seit vielen Jahren dieses "Voldemord-Gerät" von einem berühmten Onlineversand online praktiziert.
Siehe auch [FROSCON-Vortrag 2025 "A...xa ohne Cloud"|https://programm.froscon.org/froscon2025/talk/f0790b15-791e-45fa-b15a-478c291d5cf4/]