Member-only story

How to convert Medium article to audio with Python

Manpreet Singh
5 min readAug 20, 2021

--

Welcome back! I recently thought about developing videos about my articles, I thought to myself “what is the easiest way of doing this”, and I remembered I was a programmer, so I built out a simple project which creates audio from your Medium article, let’s take a look at this project! Now, make sure you have Python installed on your machine, if not, here is a tutorial on how to do so:

Let’s get into coding!

Building The Project

Now we are ready to code out the project, for this tutorial we will be using a few different packages: Selenium (a web scraper), gTTs (Google’s text to speech engine), and a web driver, in this specific case we’ll use Google chrome driver, here are the following packages we use:

from gtts import gTTS
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.options import Options

To install these packages you can just pip install them. Next up, we want to declare the options of our Selenium package:

--

--

Manpreet Singh
Manpreet Singh

No responses yet