professed
Finally, I made a second script which converts and reads an input from selected text. The script is called with a custom shortcut Ctrl+Shift+R
after having selected the part to be read.
#!/bin/bash
wl-paste --primary | pandoc --standalone --from markdown --to plain --no-highlight | piper --model ~/apps/Speak/en_GB-cori-high.onnx --output_file /tmp/tts-output.wav; vlc /tmp/tts-output.wav
N.B.: I'm on Wayland and had to install wl-clipboard
, the --primary
gets the selected text (primary buffer); uv tool did actually install piper
to ~/.local/bin/piper
.