Skip to main content

Module cleanup

Module cleanup 

Source
Expand description

Post-transcription text cleanup ( “flow”).

Two backends:

  • rules (default): pure on-device regex/heuristics — no network, no model
  • openrouter: LLM rewrite via chat completions (optional, explicit)

Cleanup is opt-in at the CLI/library boundary so raw ASR stays available.

Re-exports§

pub use openrouter::OpenRouterCleanup;
pub use rules::RulesCleanup;

Modules§

openrouter
LLM-assisted cleanup via OpenRouter (JOE-1589 structured untrusted-data contract).
rules
On-device rule-based cleanup (JOE-1610).

Structs§

CleanupReport
Structured report for a full-result cleanup transaction.
CleanupResult
Result of a cleanup pass over bare text.

Enums§

CleanupProviderKind
Where cleanup runs.
CleanupStyle
How aggressively / in what shape to clean transcript text.
SegmentCleanupPolicy
How to treat ASR segments after cleaning the full transcript text.

Constants§

MAX_PER_SEGMENT_CHARS
MAX_PER_SEGMENT_COUNT
Hard bounds for per-segment cleanup (failure semantics live here; remote batching belongs to a follow-up issue).

Traits§

TextCleanup
Pluggable cleanup backend.

Functions§

apply_cleanup
Apply cleanup to a full transcription result.
apply_cleanup_with_segments
Like apply_cleanup with explicit segment policy.
apply_cleanup_with_segments_op
Like apply_cleanup_with_segments with an optional OpContext for cancel, deadline, and progress (JOE-1831).
cleanup_text
Clean a bare string (stdin / text file path) without a full transcription result.