Skip to main content

DPO Reader

Turn Discourse threads into podcasts. Each author gets their own voice.

PyPI Version Python Versions License


I got tired of skimming long forum threads. DPO Reader converts them to audio so I can listen while doing other things. Point it at any Discourse thread and it'll synthesize the whole thing with different voices for each participant.

Install

# uv (recommended)
uv tool install dpo-reader

# Or run directly without installing
uvx dpo-reader listen "https://discuss.python.org/t/your-thread"

# pipx works too
pipx install dpo-reader

Usage

# Basic: generate audio and play it
dpo-reader listen "https://discuss.python.org/t/your-thread"

# Interactive TUI with read-along highlighting
dpo-reader listen "https://discuss.python.org/t/your-thread" --ui

# Start from a specific post (the /50 in the URL does this automatically)
dpo-reader listen "https://discuss.python.org/t/your-thread/12345/50" --ui

# Or explicitly with -s
dpo-reader listen "https://discuss.python.org/t/your-thread" -s 50

# Export without playing
dpo-reader export "https://discuss.python.org/t/your-thread" -o thread.wav

# See what you're getting into before generating
dpo-reader info "https://discuss.python.org/t/your-thread"
dpo-reader preview "https://discuss.python.org/t/your-thread"

Options

-o, --output PATH         Output file (default: output.wav)
-e, --engine ENGINE       openai | bark | piper
-s, --start-post INT      Start from this post number
-n, --max-posts INT       Limit number of posts
--ui                      Interactive TUI with controls
--no-attribution          Skip "Author says:" prefix
--no-play                 Don't auto-play after generating
-c, --cache-dir PATH      Cache audio chunks (useful if generation crashes)
-p, --pause FLOAT         Seconds between posts (default: 1.5)
-f, --file PATH           Load from local JSON (testing)

TTS Engines

Engine Quality Speed Notes
OpenAI Best Fast Needs API key, costs money
Bark Excellent Slow (~10s/sentence) Local, wants a GPU
Piper Good Fast (~0.1s/sentence) Local, CPU-only

Bark is the default. It runs locally and produces natural-sounding speech with good intonation. A GPU helps a lot but isn't strictly required.

OpenAI (-e openai) sounds the best if you have an API key. Get one at platform.openai.com/api-keys and set OPENAI_API_KEY in your environment or a .env file.

Piper (-e piper) is the lightweight option. Install with uv pip install dpo-reader[piper]. Good for batch processing or machines without GPUs.

TUI Controls

When using --ui:

Key Action
Space Play/Pause
←/→ Skip 5 seconds
↑/↓ Speed up/down
n/p Next/Previous post
l Toggle logs
q Quit

Requirements

Python 3.10-3.14 (bark/torch). The optional piper extra doesn't support 3.14 yet: no onnxruntime release supports both 3.10 and 3.14, and torch has no 3.15 wheels.

Development

git clone https://github.com/JacobCoffee/dpo-reader.git
cd dpo-reader
make dev

make lint        # Linting
make type-check  # Type checking
make test        # Tests
make ci          # All of the above

# Test TTS locally
make test-listen  # Piper
make test-bark    # Bark

License

MIT

Metadata

Release files for dpo-reader 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dpo-reader 0.1.1
File Size Uploaded
dpo_reader-0.1.1.tar.gz 28.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dpo-reader 0.1.1
File Interpreter ABI Platform
dpo_reader-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 57.5 kB

Release files / dpo_reader-0.1.1.tar.gz

Download URL dpo_reader-0.1.1.tar.gz
Size 28.4 kB
Tags Source
SHA-256 checksum
How to use checksums
248d4c27e409743010ad832349427e91e78d90f6795ee806d3b337b3ed8dd089
BLAKE2b-256 checksum
How to use checksums
96471e031ec2608c96c371d649f4b997713d13befee0b68cae1d91340697fef5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / dpo_reader-0.1.1-py3-none-any.whl

Download URL dpo_reader-0.1.1-py3-none-any.whl
Size 29.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c87bc9acb07adcf704302b5c36212ee9a7156e69c67ccabac1ebbced9f9c036
BLAKE2b-256 checksum
How to use checksums
747f4db768cee48cadd937925f3d6e88f1fd2ce9c518c1eb7563510b85aa9402
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page