Skip to content

Listen to PDFs with natural TTS and read-along text prompts

Notifications You must be signed in to change notification settings

Acumane/lectern

Repository files navigation

📖 Lectern

Listen to PDFs with natural TTS and read-along text prompts

Motivation

Microsoft Edge's built-in "Read Aloud" feature is second to none but was inexplicably pulled from Linux builds in 2022. Lectern lets me listen to PDFs with Microsoft's natural voice engine independent from the browser.

Features

  • Convert a range of PDF pages to quality speech
  • Configuration file for changing voice, speed, and other settings
  • Cuts out (most) headers, footers, captions, titles, and other text fragments
  • Concurrent page processing
  • Saves pages as .mp3s
  • Prints words as they're spoken (includes punctuation)
  • Pause, resume, skip pages, and quit
  • Bionic reading

⚠️ Disclaimer This program is minimally viable as of 0.2.0, though a few bugs persist as minor annoyances. Check issues to avoid or work around them.

Installation

cd <~/somewhere/convenient>
git clone https://github.com/Acumane/lectern
cd lectern

# install dependencies
pip install -r requirements.txt

Done!

Quickstart

python main.py <path/to/pdf> <first>-<last pg #>
  • Use page #s given by a PDF reader to inform your range
  • A single page is also valid.

Configuration

  • A template config is provided in lec.conf. For a list of available voices, run edge-tts --list-voices