Skip to main content

Module postprocess

Module postprocess 

Source
Expand description

Shared transcript cleanup applied after every provider (JOE-1609).

Whisper (and some remote models) emit control / non-speech tokens that should not leak into scripted txt/srt/json output. Normalization produces an explicit NormalizationReport listing repairs and drops.

Structs§

NormalizationEvent
One normalization repair or warning (deterministic, no provider payloads).
NormalizationReport
Report of repairs applied while normalizing a provider result.

Functions§

detect_repetition_degeneration
Conservative transcript degeneration detector (JOE-1650).
normalize_result
Clean provider output into a stable, scriptable result.
normalize_result_with_report
Like normalize_result but returns an explicit repair report.
truncate_chars
UTF-8–safe truncation for error messages (never panics on char boundaries).
validated_segment
Validated segment constructor (rejects NaN/inverted spans).