2

Right now I have a keybinding that uses the xsel program to grab the contents of selected text and pass it to the festival text to speech engine:

#!/bin/bash
xsel |festival --tts --pipe  

I want to have the ability to toggle a process that will allow me to have any text I highlight automatically spoken, and I want to kill and restart the process if I highlight something else. Is this even possible? I think such a tool would greatly enhance everyone's workflow.

OS: Ubuntu 18.04.4 LTS x86_64 Kernel: 5.3.0-51-generic Shell: zsh 5.4.2 DE: GNOME

Micheal Bee
  • 139
  • 3
  • I don't want to say "no", because it probably can be done, if somewhat hackily. You could implement something that watches the X selection buffer (XA_PRIMARY) and when its contents change, speak that. Of course that's not ideal, you 'd want to check for it being set ideally. – knghtbrd Aug 10 '20 at 02:33
  • Thank you very much. "Hacky" is fine. ;) – Micheal Bee Aug 12 '20 at 00:06

0 Answers0