The Need: a 3-hour audiobook is too long to proof by ear

My family book library turns public-domain classics into audio. The texts come from Project Gutenberg. I translate them into Korean, then an AI (DeepSeek) writes a retelling script for each book, one section per chapter (the Odyssey has 24 books, so 24 sections plus an intro and an ending). A free text-to-speech voice reads it. Homer’s Odyssey (Gutenberg #3160) came out at about 154 minutes. Since then the same pipeline has made The Iliad (#3059, about 159 minutes) and Bulfinch’s Mythology (“The Age of Fable,” #4928, about 204 minutes), among other books. All of these are old translations or originals in the public domain, so I name them and quote them freely here.

I listened to it. It was mostly fine. But I noticed three things:

  • A summary seemed to be missing in the middle.
  • One or two sentences were said twice.
  • Odysseus tells the one-eyed giant Polyphemus that his name is “Noman.” The Korean translation had turned it into an ordinary name, “노만” (Noman), so the trick made no sense to a listener.

Now the problem. If I find a mistake by listening, I fix the script, and then the audio has to be made again. A full re-read of 854 lines took about 873 seconds. And I cannot sit through three hours for every book.

So the question was not “can AI write a script?” It was: who should check the script, and how much of it?

The Proof: what the AI reviewer found, and what it did not

I wrote a small read-only tool, review_podcast_script.py. For each chapter it sends two things to DeepSeek: the chapter summary (the source) and the script section. It asks for missing events, repeated content, factual errors, and bad seams between sections. Separately, plain Python looks for similar sentences within 60 lines of each other.

The numbers for the Odyssey (27 sections):

First reviewAfter rewriting flagged sections
Average score (1–10)7.468.04
Missing events flagged2714
Repeats flagged1411
“Errors” flagged5734
Bad seams flagged1612

The scores went up. But I did not trust this table, for two reasons.

Reason 1: many “errors” were false alarms. The only source the reviewer had was a 500–800 character summary per chapter. When the script said something true that was not in the summary, the reviewer called it an error. By my rough count, about half of the flags were this kind. When I compared with the original text, I found almost no made-up facts. Small invented details exist, but they do not matter.

Reason 2: the rewrite made the book shorter. Rewriting flagged sections cut the script from about 50,000 to 42,000 characters, and the audio from 154 to 127 minutes. The rewriter was told not to add things the summary did not have, so it left them out. A tighter script is not a better audiobook if I wanted a long one.

What helped most was not the AI report at all. It was what I heard:

  • A passage that belonged at the end of Book 10 (Circe’s island) was sitting at the start of Book 11 (the visit to the dead).
  • “No-man” had been carried into Korean as a plain name. In Book 9, when the blinded Polyphemus cries “Noman is hurting me,” the other Cyclopes go home, because nobody is hurting him. In Korean the joke was gone. I replaced it everywhere (text, summaries, script) with “아무도 아닌 자” (“nobody”). The translation is Pope’s English version, which writes it as one word, “Noman,” so a machine translator took it as a name.

The AI reviewer missed both. I think this is because the same model wrote the script and then read it, so it shares its own blind spots. That is my guess, not something I tested.

The Story: I did not want to read a 300-flag report either

After the Odyssey test I asked myself two honest questions:

  1. Will every future book go through this review step?
  2. A person reading all these reports will spend hours. Is that realistic?

My answer was no to both, for now. I did not add a review step to the pipeline. I decided to make a few more books the old way, listen, and decide later. That decision is saved in a note so I (and Claude Code) do not add the step by accident.

A day later I wrote down what I had learned. My own words, roughly: the AI rarely invents facts, and a few small inventions are fine. The thing that really needs fixing is repeated sentences. And whatever we do, the length must not shrink much.

That changed the design. Instead of “review everything and rewrite weak sections”, the plan became “find repeats and cut only those lines”.

The How: the small fix I settled on

Step 1. Find repeat candidates with plain Python (free)

norm = lambda s: re.sub(r"[^가-힣0-9a-zA-Z]", "", s)   # keep letters and digits only
# compare each line with the next 60 lines
r = difflib.SequenceMatcher(None, norm(a), norm(b)).ratio()
if r >= 0.7: candidates.append(...)

I first used a loose 0.62 so it would find too many, and I looked at every pair by hand. Later I raised the cut for “delete automatically” (see Step 4).

Step 2. Look at each pair and sort it into one of three kinds

I ran this on a second book, Homer’s Iliad (Gutenberg #3059; 24 books plus intro and ending, so 26 sections, 915 lines, about 52,000 characters). The tool gave 14 pairs. The AI review also flagged about 18 repeats. After reading them, I found these kinds:

  • Block copies. In Book 7 (the Greeks build their wall; Zeus thunders at night), four lines were repeated almost word for word a few lines later: the Trojans and Greeks both cannot sleep, the wall means little to the gods, Zeus’s thunder shows how short-lived human pride is. The model had written its closing paragraph twice.
  • Seam copies. Book 11 began by repeating the last line of Book 10 (Zeus sends Strife to the Greek ships). The end of Book 17 also copied the last three lines of Book 16 (Achilles still sits in his tent, not knowing Patroclus is dead; the fight over the body goes on). The model had been shown the previous three lines and copied them.
  • Misplaced recaps. Book 10 (the night raid by Odysseus and Diomedes) retold the council scene that had already finished in Book 9: Agamemnon proposes going home, Diomedes objects, Nestor suggests winning back Achilles with gifts. Three lines of this recap were cut.
  • Repeats that are fine. In Book 2, Zeus sends a false dream to Agamemnon, and then Agamemnon retells the dream to the elders. That retelling is in the original story, so I kept it.

I removed 11 lines (Book 7: 4, Book 10: 3, Book 11: 1, Book 17: 3), about 1,100 characters, which is about 2% of the script. No section was rewritten. I did not use the AI to fix the lines, only my own eyes to pick them.

Step 3. Make audio again, only what changed

The voice files are cached by a hash of each line’s text. After deleting lines, I run the same command again and only new or moved lines are read.

py scripts/make_podcast.py --ids 3059 --tts-only --method 2
py scripts/push_to_nas.py 3059

The order matters. Each section has a start time that goes with the audio file. If I upload the script before making the new audio, the times do not match.

I keep the old script and old MP3 as *.before_dedupe.*, so I can go back. The new Iliad audio is 158.6 minutes long, and it took 215 seconds to make again.

Step 4. Put the delete-only part into the pipeline (decided)

After the Iliad, I told Claude Code to make this a normal step of audio generation. Not the AI review. Only the part I had done by eye, as rules:

  1. If the first 3 lines of a section look like the last 3 lines of the section before (similarity 0.6 or more), delete them. This is the “model copied the previous lines” case.
  2. If a later line is almost the same as an earlier line within 60 lines (0.85 or more), delete the later line.
  3. If a line sits next to a line already deleted and is 0.7 or more similar to an earlier line, delete it too. This catches copied blocks.
  4. Pairs between 0.7 and 0.85 are not deleted. They go into a report file for me to judge by ear.
  5. If the rules want to delete more than 5% of all lines, delete nothing and say so. Something odd is happening and a human should look.

It only runs on the one-narrator scripts, costs no API money, and never writes new text. The original script is kept once as *.before_dedupe.json, and the deleted lines are saved in a report.

I tested it on the old Iliad script first. It found 8 of my 11 hand-picked lines. The other 3 were recaps below 0.85, so they stay in the report. I think that is the right direction: it misses a little instead of cutting too much.

I also ran it, without saving, on scripts of other books I had made. It wanted to delete 5 lines in On the Origin of Species, 11 in The Prince, 14 in the second part of The Magic Mountain, and 1 in the Bulfinch Mythology. I read only about 7 of the deleted lines per book. They looked like copied blocks, for example one whole group of sentences about time and the clock repeated in the Magic Mountain. I have not listened to those books again, so I do not know yet if every deletion is right. Two books, Plato’s Republic and Dante’s La Vita Nuova, hit the 5% safety stop, so nothing was deleted there.

🗂 Claude.md Rule The audio pipeline deletes repeated lines automatically (one-narrator scripts only, delete-only, stop at 5%). Do not add an AI review or rewrite step until the owner decides. Do not rewrite whole sections. A rewrite that makes a section shorter than 90% of the original should be rolled back. Upload to the NAS only after the audio is made again.

💬 Prompt that worked “The AI rarely makes up facts when I compare with the original. Small invented details are not a problem. What we mostly need is to find repeated sentences and clean them up. But the length must not get much shorter. What corrections are really necessary?”

What I decided not to do

  • A list of odd proper names. After the “Noman” case, I had suggested a check for strange names. I told Claude Code to skip it for the Iliad: I had listened to that book and heard no problem. I will fix names while listening, if I find any.
  • Auto-rewrite of sections. It raised the score and cut the length. For me, the length loss was a bigger cost than the score gain. The AI review tool still exists, but it is not part of the pipeline.
  • Fixing the things only ears can find. Wrong chapter placement, odd names, and first-person voice (in Odyssey Books 9–12 the narrator mixed “I”, “he” and polite forms) stay with me. I fix them while listening.

Cost

  • The delete-only step adds $0 and a few seconds.
  • DeepSeek review of the Iliad: about 70,600 input and 12,750 output tokens. At the price I know, that is roughly 3 cents (my estimate; I did not check the invoice). The Odyssey review was also a few cents, and the rewrite test cost a little more.
  • The text-to-speech voice is free. The cost is time: about 873 seconds for a full Odyssey re-read.
  • The pairing of repeats takes no API calls.

What I want to improve next

  • The new Iliad audio (158.6 minutes) is made and on my NAS. I will listen to it and check whether the cuts leave any jump you can hear.
  • I compared two books. I want to try more books before I decide whether a review step is ever worth it.
  • The cut points (0.85, 0.7, 5%) came from two books and my own judgment. I want to check whether they fit a poem with refrains on purpose.
  • For Bulfinch’s Mythology (204 minutes), I plan to do the Odyssey-style listening check next.

My plan: keep the delete-only step, listen to each new book, mark the lines I want changed, and decide later whether any AI check is worth adding.