TECHNOLOGY

Transcript cleanup: punctuation must not break word-time alignment

In this article
THE QUICK TAKE

Punctuation changes display boundaries without creating an acoustic event, so formatted text needs a reversible mapping to original timed tokens.

Punctuation restoration should change transcript presentation without silently rewriting word identity or timing provenance. A readable sentence is a derived view; search and citation still need the original recognized words and their alignment status to verify what was actually heard in the recording.

Keep source tokens immutable

The Whisper project supplies transcription and output tools, while WhisperX adds word-level alignment workflows. Store the recognized token sequence separately from display text. Punctuation can alter sentence boundaries without adding an acoustic event. If a formatter merges, splits or corrects words, retain an explicit mapping rather than replacing timed tokens with a new sentence that no longer matches them.

Distinguish timing from typography

The WhisperX paper grounds timing in alignment. A comma or full stop inserted for readability does not necessarily have its own measurable interval. Attaching punctuation to a neighboring word can be a display convention, but it must not change that word’s source time. Keep the convention documented so subtitle and citation builders interpret boundaries consistently rather than independently inventing timing for punctuation marks.

Test a meaning-sensitive phrase

Use a recording with a short negation, a product identifier and a pause that could suggest a sentence break. Compare raw words, punctuated text and the rendered excerpt. The formatter must not remove the negation or normalize the identifier into a different product. A sentence can look more polished after such changes while becoming materially less faithful to the original utterance.

LayerPreserved information
Raw transcriptRecognized wording before formatting
Aligned tokensAvailable times and uncertainty
Display textPunctuation and readable grouping
MappingRelationship from display words to source tokens

Handle edits as edits

A spelling correction or expanded abbreviation is more than punctuation. Record it as a derived edit and keep the source form available for exact quotation. If a display word corresponds to several timed tokens, preserve that relationship rather than selecting one arbitrary timestamp. Missing alignment should remain visible; a punctuation pass cannot create acoustic evidence for a word whose timing was never established.

Validate search and export together

Run the fixture through search snippets, subtitles and playback links. Check that the displayed excerpt resolves to the same words and source span in every output. Inspect boundary words around newly inserted sentence breaks. The acceptance artifact is a reversible token-to-display mapping, not just attractive punctuation. This allows readability improvements while keeping technical quotations, exact identifiers and timing claims anchored to the original transcript and recording.

Related reading: Long audio with Whisper: segments, queues and durable results; A GPU OCR pipeline for a 1,000-page PDF workload.

← All articles