Created
February 4, 2022 13:01
-
-
Save iitenkida7/c44990714a081b0f7fb63ac39f305d43 to your computer and use it in GitHub Desktop.
get aws polly audio
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 | |
SCRIPT_DIR=$(cd $(dirname $0); pwd) | |
DATA_JSON=${SCRIPT_DIR}/../nuxt/typing_data.json | |
DIST_DIR=${SCRIPT_DIR}/../nuxt/public/audio | |
export AWS_PAGER="" | |
mkdir -p ${DIST_DIR} | |
for WORD in $(cat ${DATA_JSON} | jq -r ".[].word") ; do | |
echo ${WORD} | |
aws polly synthesize-speech \ | |
--output-format mp3 \ | |
--voice-id Matthew \ | |
--text "${WORD}" \ | |
${DIST_DIR}/${WORD}.mp3 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment