Skip to content
~/patrick/projects/pdf-to-speech
← projects

system lane

PDF-to-Speech Audiobooks

A Python tool that converts PDF documents into audiobooks, using Google Gemini for text cleanup and speech synthesis, available as both a CLI and a Flask web app.

pipeline
  1. data (covered)
  2. model (not covered)
  3. eval (not covered)
  4. serve (covered)
  5. monitor (not covered)
stack

PythonFlaskGemini APISQLAlchemy

links

source ↗

I built and open-sourced this as a personal project. It extracts the text from a PDF and uses Gemini to clean up the OCR text, and then it generates the audio with Gemini’s text-to-speech. Long documents are processed in chunks so that they stay within the API quota limits.

The web app has an upload and progress interface, an in-browser audio player, and job history, with persistent storage through SQLAlchemy against SQLite or PostgreSQL.

nextTime Tracker →

keyboard

⌘K /
Search and commands
t T
Next / previous theme
j k
Move through items on the page (k on the first one goes back to the top)
o
Open the selected item
g then h w p b a l
Home, Work, Projects, Blog, About, Lab
c
Copy email
?
This list

Choose a theme

Dark

Light

You can also press t to step through them.