feat: add v2 post-correct mode with optional local llm

This commit is contained in:
Adolfo Reyna
2026-03-06 19:36:08 -05:00
parent 57366543ec
commit 564fcaac1a
2 changed files with 97 additions and 0 deletions
+8
View File
@@ -160,3 +160,11 @@ The project now features a high-performance, Apple Silicon-optimized pipeline th
- Wrapped Arabic caption content in explicit RTL embedding marks for better bidirectional layout stability.
- Added punctuation normalization for Arabic display (`،`, `؛`, `؟`) to reduce LTR punctuation artifacts.
- **Outcome:** Arabic captions render more consistently in terminal output, especially when adjacent to English/French/Spanish caption lines.
## Phase 20: Post-Correct Mode (V2 Foundation)
- **Goal:** Add a practical second-stage correction pass for finalized English captions.
- **Approach:**
- Added `--post-correct` mode to run deterministic rule-based cleanup after ASR (spacing, punctuation cleanup, disfluency reduction, immediate duplicate-word collapse).
- Added optional local LLM correction via Ollama (`--post-correct-llm`, model/url/timeout flags) with strict fallback to rules-only when unavailable.
- Integrated post-correction after bridge-to-English and before downstream translation so improved English text propagates to target-language MT.
- **Outcome:** The pipeline now supports a two-stage transcription flow (ASR -> correction) with low-latency defaults and optional local generative enhancement.