Skip to content

Instantly share code, notes, and snippets.

@garystafford

garystafford/polly.sh

Last active Aug 11, 2020
Embed
What would you like to do?
TEXT_FILE_CONTENTS=$(cat path/to/my/blog_text_file.txt)
OUTPUT_BUCKET=my_bucket_name
TOPIC=blog
aws polly put-lexicon \
--name blogvocab \
--content file://path/to/my/blogvocab.pls
aws polly put-lexicon \
--name techterms \
--content file://path/to/my/techterms.pls
aws polly start-speech-synthesis-task \
--engine neural \
--language-code en-US \
--lexicon-names blogvocab techterms \
--output-format mp3 \
--output-s3-bucket-name ${OUTPUT_BUCKET} \
--output-s3-key-prefix ${TOPIC} \
--text ${TEXT_FILE_CONTENTS} \
--text-type text \
--voice-id Joanna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment