pdf-to-audio / README.hf.md
chiefkarim's picture
fix(deploy): align port to 7860 for HF Spaces; update README.hf.md
db34ebb
|
Raw
History Blame Contribute Delete
1.01 kB
---
title: Pdf To Audio
emoji: 🎧
colorFrom: green
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
---
# PDF-to-Audio
Convert PDF files to broadcast-quality audio via OCR + neural TTS. Runs fully offline β€” no cloud APIs, no data sent anywhere.
## How it works
1. **PDF extraction** β€” text layer read directly with PyMuPDF (milliseconds); Tesseract OCR fallback for scanned/image-only pages
2. **TTS synthesis** β€” two modes selectable per conversion:
- **Fast** β€” Meta MMS-TTS (`facebook/mms-tts-eng`, VITS, 16 kHz) β€” ~10Γ— real-time on CPU
- **Quality** β€” Coqui Tacotron2-DDC (LJSpeech, 22 kHz) β€” richer prosody
3. **Audio processing** β€” pedalboard DSP chain (HPF, presence EQ, de-esser, compressor) applied to all output regardless of mode
4. **Export** β€” MP3 (192 kbps) or WAV (16-bit PCM)
Both models are pre-baked into the image β€” no downloads at runtime.
## Source
Built from [github.com/chiefkarim/pdf-to-audio](https://github.com/chiefkarim/pdf-to-audio).