Created
October 20, 2019 13:36
-
-
Save originalsouth/1eeb046dc3e142e9b51d14e24440657e to your computer and use it in GitHub Desktop.
Script to convert copied text to sound via xsel and pico-tts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/Iiridayn/pico-tts