If you’re like me sometimes you’ll have a PDF file that you want to listen to passively while you’re doing something else. Here’s some Python code I put together to convert a PDF file to MP3 using Google Colab and Python.
This script can either process one PDF file that you select or process an entire directory that you can mount with Google Drive.
If your PDF does not contain text but instead is images you might try first converting it using OCR.