Skip to content

Instantly share code, notes, and snippets.

@fasiha
Created September 17, 2018 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fasiha/75d99896329fd7885e0724387a1afe16 to your computer and use it in GitHub Desktop.
Save fasiha/75d99896329fd7885e0724387a1afe16 to your computer and use it in GitHub Desktop.
AWS Polly-aided text-to-speech, like, literally: a text file to numbered MP3 files.
counter=1
cat input.txt | while read line; do
echo $counter $line
aws polly synthesize-speech --output-format mp3 --voice-id Takumi --text "$line" "$counter $line.mp3"
counter=$((counter+1))
sleep 0.5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment