The Need: the AI writes what you ask for, even when the book cannot give it

My family book library turns public-domain classics into audio. A Korean translation goes to an AI (DeepSeek), which writes a retelling script chapter by chapter. A free voice reads it. Most books come out fine. Two books did not, and they failed in opposite ways.

Too short a book, too long an audio. Francis Bacon’s New Atlantis is a short work. I asked for 60 minutes, because that was what I typed into the form. The script restarted from the beginning in the middle. Later parts mixed up stories and invented things the book never says.

Too long a book, too short an audio. Josephus’s Antiquities of the Jews is about 1.4 million Korean characters after translation. The app recommended 200 minutes. I entered 240, the limit at that time. The result was a fast bus tour. Names and dates went by, and I learned nothing new.

I wanted to know one thing: how detailed can a very long book be, if I stop squeezing it into one sitting?

The Proof: same pipeline, two numbers that now match the book

The old pipeline read the book as chapter summaries of 500 to 800 characters. If a book has no chapter marks, one “chapter” can be the whole book. That is what happened with New Atlantis: one summary stood in for about 44,000 characters of text. The AI had almost nothing to work from, so it filled the time.

New AtlantisBeforeAfter
Summary units512
Summary text2,231 characters8,616 characters
Audio length I asked for60 min60 min (limited to the 27 the material supports)
Test resultrepeats and invented city scenes2 parts of about 14 min, 0 near-duplicate lines

The test script now includes details from the text, such as the feast and the list of rooms in the house of research. The made-up market and city walls are gone. I have not published the audio yet. It is being made now.

For Antiquities, the number that mattered was the share of the book that gets told:

240 minutes563 minutes
Characters spoken (341 per minute)about 82,000about 192,000
Share of the translated textabout 5.8%about 13.7%
Shapeone long audioabout 8 parts of roughly 70 minutes

The 563-minute audio is being made now. I will listen part by part.

The Story: I do not need one perfect book

I started by fixing the New Atlantis script. Then I changed my mind about what to ask. I have many books waiting, so one good fix for one book is not enough. I asked for a better procedure, or a different model. My analysis of 20 books pointed to the input, not the model. Summaries that are too thin make any model invent things. A bigger model would invent more smoothly.

So the rule became simple. Audio length must be backed by source material. If the summaries hold 8,616 characters, the script should not be much longer than that. I also tested the limit: asking for more than about 1.1 times the summary produced filler sentences at the ends of sections. And for a very long book, one audio cannot carry enough. It must be split.

I like this kind of work. Nothing here needed a new tool. It needed one honest question: “how much does the book actually give me?”

💬 Prompt that worked “Don’t focus on handling just this one book, because there is a lot to process. Can the existing procedure be improved, or are there other models or alternatives?” (2026-11-17 12:43)

“Do items 1 and 2 first. And the Jewish Antiquities source text is very long. The suggested audio length was 200 minutes and I entered the 240-minute limit. But it feels like a fast bus tour. No new knowledge is created. If the text is long, please let it make the audio in several parts so the content is solid.” (2026-11-17 12:47)

The How: four small changes

Everything is in my Python pipeline plus the Flask app. Cost so far is DeepSeek cents. I did not record the exact balance change for this round, and I will add the real figure for the 563-minute run when it finishes.

1. Split summaries by length, not by chapter marks. Any section over 6,000 characters is cut at paragraph breaks into pieces of about 4,000 characters. Each piece is summarized on its own, and the title gets (1/3), (2/3). A tiny first section (“BY …”) is merged into the next one. Prefaces, tables of contents and notes are excluded from the body. Antiquities became 442 summary units. New Atlantis became 12.

py summarize_book.py 2434 --dry-run     # shows the units, no API call

2. Check the material before writing. A small file, podcast_plan.py, computes the limit:

limit = min(source * 30%, summary * 1.1) / 341 characters per minute
standard = source / 2,500 characters per minute   (max 720 min)

For New Atlantis this gave about 27 minutes, so a 60-minute request was cut down and the reason is printed. Old summaries without the new fields are rebuilt automatically when an audio job starts.

3. Split long books into parts. Over 180 minutes, the audio becomes parts of about 75 minutes each. Part boundaries follow chapter boundaries where possible. Part 1 has the opening, the last part has the ending, and the middle parts stop in the middle of the story. Each part starts with one sentence about where the last part ended. My first version had separate “previously” and “to be continued” segments. They repeated the earlier content, so I removed them. Files are named {id}-m2-p1.json, -p2 and so on. A new podcast_parts table and a “choose a part” row on the book page handle listening and resume.

4. Show the plan before the money is spent. The admin form now accepts up to 720 minutes. While I type, it shows something like “9 hours 23 minutes = 8 parts of about 70 minutes”, and a warning when the material cannot support what I asked for.

🗂 Claude.md Rule Audio length must be backed by source material: audio characters ≤ summary characters × 1.1, and ≤ 30% of the source. Over 180 minutes, split into parts of about 75 minutes. Never ask the writer for more than the summaries contain.

One more fix came from the first two-part test. The intro told the plot before the body did, so the body repeated it. A new rule, “the opening must not tell the plot,” fixed that.