Skip to content

Instantly share code, notes, and snippets.

@originalsouth
Created October 20, 2019 13:36
Show Gist options
  • Save originalsouth/1eeb046dc3e142e9b51d14e24440657e to your computer and use it in GitHub Desktop.
Save originalsouth/1eeb046dc3e142e9b51d14e24440657e to your computer and use it in GitHub Desktop.
Script to convert copied text to sound via xsel and pico-tts
#!/usr/bin/env zsh
text=$(xsel -b | perl -pe 's/\. /\.\n/g')
while read -r line
do
echo $line | pico-tts | aplay -q -f S16_LE -r 16
done <<< "$text"
exit 0
@originalsouth
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment