ubuntu/ Linux speak highlited text
Ubuntu
linux
sudo apt install speech-dispatcher espeak-ng xsel
#!/bin/bash
text=$(xsel)
[ -n "$text" ] && spd-say "$text" --rate 50
save as ~/speak-selection.sh
schmod +x speak-selection.sh
- Go to Settings → Keyboard → Keyboard Shortcuts → Custom Shortcuts
- Add a new shortcut:
- Name: Speak selected text
- Command:
/home/me/speak-selection.sh - Shortcut: e.g.
Ctrl+Esc