Last active
September 23, 2020 04:06
-
-
Save makyo/16640c0b5ef4989996a08ffbe585fc7c to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
infile="$1" | |
while read line; do | |
words=`echo "$line" | wc -w` | |
if [ $words -gt 0 ]; then | |
bytes=`espeak "$line" --stdout | wc --bytes` | |
seconds=`python -c "print(float($bytes) / 44000.0)"` | |
echo "$line" | |
sleep $seconds | |
fi | |
done < $infile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment