Finding unwanted words in a transcript sounds like a string search, but audiobook transcripts contain punctuation, contractions, duplicate word arrays, and timing errors. Those details decide whether a filter catches the intended word or mutes the wrong passage.

Normalize carefully

Clean Read lowercases terms, converts curly apostrophes to straight apostrophes, and extracts word tokens. Keeping the apostrophe inside a token preserves the difference between hell and hell's. A real Jurassic Park report revealed that exact matching missed one Hell's even though the base word was enabled. The matcher now tries the configured base term as a fallback for recognized contraction suffixes.

Match phrases before single words

For a phrase such as “oh my god,” index configured terms by their first token and prefer the longest matching sequence. Otherwise a shorter word match can consume part of a longer phrase and leave the report confusing. The CLI also supports explicit custom words and regex rules, each with a bounded word window.

Do not double-count transcript words

Some WhisperX-style files contain both word_segments and segments[].words. If you simply append both arrays, the same spoken word appears twice. Clean Read deduplicates on start time, end time, and normalized text before matching.

Convert matches to audio edits

Each match stores its term, category, timestamps, and word count. Padding grows the mute interval before and after speech. Overlapping padded intervals are merged into one mute range before FFmpeg runs. Keep both the original match and the merged range in the report: one explains why the audio was changed; the other explains where the silence occurs.

Review edge cases

A transcript may mistake a name for a filtered term, or miss a word because speech recognition heard something else. Review the report and listen to contextual audio. No term list or model can promise perfect coverage without human verification.