podcastify.py
The CLI. Reads the EPUB or text file, builds the script, synthesises the audio.
An audiobook is one voice reading at you for nine hours.
Point Podcastify at an EPUB or an article and it stages the text as a two-host show: one host narrates in short segments, a co-host interjects between them, and the whole thing is rendered with free neural voices and stitched into a single MP3. No API key needed. Optionally, let Claude rewrite the source into a genuine back-and-forth instead.
rule needs nothing but Python. llm hands the
text to Claude for a real conversation.
in rule mode. Free edge-tts neural voices, no key, no
per-character billing.
of finished audio from a 1,800-character excerpt in a single command, verified end to end.
out: the MP3 and a readable transcript, so you can check the script before committing to the audio.
↓ a real run
This is an actual run against a public-domain excerpt. It builds the script, renders each turn with its own voice, and stitches the result:
$ python podcastify.py alice-excerpt.txt [1/9] A: Welcome to Podcastify. Today we're getting into alice-e... [2/9] B: That's right. Let's dive in.... [3/9] A: Alice's Adventures in Wonderland, by Lewis Carroll (186... [4/9] A: There was nothing so VERY remarkable in that; nor did A... [5/9] B: And why does that matter?... [6/9] A: Exactly. Let me read on.... [7/9] A: In another moment down went Alice after it, never once ... [8/9] B: That's a great place to wrap up. Thanks for listening t... [9/9] A: See you next time.... wrote alice-excerpt.podcast.mp3 $ ffprobe -show_entries format=duration alice-excerpt.podcast.mp3 duration=118.584000
Two minutes of two-voice audio from one command, with a transcript written
alongside it. The --script-only flag stops before synthesis if
you want to read the script first, which on a full-length book is the
difference between a ten-second check and a long render.
↓ the honest limitation of the free mode
Rule mode is faithful to the source and needs no API key, and the price of that is that the co-host has nothing to actually say. Its interjections come from a fixed pool, and over a long transcript the repetition is obvious:
**Sam:** So what does that actually mean for the reader? **Alex:** Exactly. Let me read on. ... **Sam:** And why does that matter? **Alex:** So here's what comes next. ... **Sam:** Mm, that raises a question for me. **Alex:** Good question. Here's the next part. ... **Sam:** Oh, I like where this is going. **Alex:** Good question. Here's the next part. ← repeats
That is what rule mode is: a structured two-voice reading, dramatised rather than rewritten. It changes the texture of a long listen — a second voice every few paragraphs genuinely does hold attention better than one — and it is not a conversation, and this page is not going to pretend otherwise.
--mode llm is the fix. With
ANTHROPIC_API_KEY set, Claude rewrites the source into an actual
host-and-co-host discussion where the second voice responds to the content in
front of it. That mode costs money per book; rule mode costs nothing. Both
ship, and the trade-off is stated rather than buried.
↓ the pieces
podcastify.pyThe CLI. Reads the EPUB or text file, builds the script, synthesises the audio.
script_builder.pyTurns source text into a two-host script, either rule-based or via Claude.
tts_engine.pyRenders each turn with edge-tts and stitches them with
ffmpeg.
--voice-a and --voice-b take any
edge-tts voice, so the pairing is whatever you find easy to
listen to.
Finish · what it is built on
.epub, .txt, .md or .htmledge-tts neural voices, no API keyANTHROPIC_API_KEY--script-only skips synthesis