feat: add optional speaker-change detection for line cuts

This commit is contained in:
Adolfo Reyna
2026-03-06 20:02:38 -05:00
parent 2881bd96dd
commit 11dbc5ce9a
2 changed files with 94 additions and 1 deletions
+9
View File
@@ -176,3 +176,12 @@ The project now features a high-performance, Apple Silicon-optimized pipeline th
- Enforced strict low-latency behavior with `--llm-merge-timeout` (default 0.7s) and automatic fallback to heuristic merges on errors/timeouts.
- Added safety guards to reject overly large LLM rewrites and preserve buffered caption state when merge is rejected.
- **Outcome:** Merge decisions remain fast and deterministic by default, with optional LLM arbitration for cleaner sentence continuity.
## Phase 22: Optional Speaker-Change Line Cutting
- **Goal:** Split long live captions earlier when a different person starts speaking.
- **Approach:**
- Added optional `--speaker-change-detect` mode with cosine-similarity comparison of lightweight voice signatures from buffered audio.
- Introduced tuning flags for sensitivity and runtime cost (`--speaker-sim-threshold`, `--speaker-min-buffer`, `--speaker-check-interval`).
- When a probable speaker switch is detected, the current buffered caption line is force-flushed early instead of waiting only for silence.
- Added speaker-state resets on watchdog/hallucination/silence reset paths to avoid stale identity drift.
- **Outcome:** Users can opt into faster caption segmentation at speaker boundaries while keeping default behavior unchanged.