In this post, we’ll go over how to set up a Google API, write a Python script to extract text from a Markdown file, and create a Hugo shortcode to include the generated files in your static website. Read the file into memory Do some clean up, and convert it to plain text Send the text to our Google Cloud Text-to-Speech API, and write the audio from the response to disk $ python scripts/text_to_speech.py content/post/2019-10-29-use-google-cloud-text-to-speech-to-create-an-audio-version-of-your-blog-posts.md 2019-10-29 23:19:59,995 INFO Synthesizing speech for 2019-10-29-use-google-cloud-text-to-speech-to-create-an-audio-version-of-your-blog-posts_0 2019-10-29 23:20:08,044 INFO Audio content written to file…