From 3a16e4440993275b15b9b43a67410d52336a75c8 Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Sun, 1 Mar 2026 11:39:25 -0500 Subject: [PATCH] docs: update history.md with Phase 13 and 14 for stability and multi-channel support --- history.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/history.md b/history.md index 0ca0267..96e1238 100644 --- a/history.md +++ b/history.md @@ -102,3 +102,18 @@ The project now features a high-performance, Apple Silicon-optimized pipeline th - **Prompt Caching (`-c`):** Implemented a rolling context buffer that feeds the last 200 characters of previously transcribed text back into Whisper as an `initial_prompt`, maintaining sentence continuity. - **Language Bypassing (`--lang`):** Added the ability to hardcode the source language to skip the Whisper language identification phase on every chunk. - **Heuristic Punctuation Buffering (Reverted):** Briefly implemented a system to hold English translations until a definitive punctuation mark was reached to prevent grammatical errors. This was reverted because Whisper's punctuation generation is not 100% reliable, leading to translations getting "stuck" in the buffer indefinitely if no period was generated. + +## Phase 13: Stability & Stuck Detection (Watchdog) +- **Goal:** Prevent captions from getting "stuck" during long periods of music, singing, or model hallucinations. +- **Approach:** + - **Transcription Watchdog:** Implemented a logic that monitors the audio buffer duration and the time since the last *unique* draft change. If the buffer exceeds 12s without a change for 7s, or if it hits an absolute limit of 25s, it forces a clean reset. + - **Hallucination Filtering:** Added regex-based detection for common Whisper hallucinations (e.g., "Thanks for watching", "Please subscribe") and a repetition counter to identify and discard high-frequency loops (e.g., "Hallelujah" repeated 20 times). + - **Buffer Optimization:** Reduced the default maximum buffer from 30s to 20s (now configurable via `--max-buffer`) to ensure more frequent flushes during continuous sound. +- **Outcome:** Significantly improved reliability during live church services and musical performances where Whisper previously tended to "hang" or hallucinate. + +## Phase 14: Multi-Channel & Language Filtering +- **Goal:** Isolate specific speakers or languages when the audio feed contains multiple mixed sources. +- **Approach:** + - **Stereo Channel Selection:** Added `--channels` and `--pick-channel [0|1]` flags. This allows the tool to pull a specific audio channel (e.g., English on Left, Translation on Right) from a stereo feed, ignoring the other. + - **Language Filtering (`--filter-lang`):** Integrated a mechanism to discard any segment where the detected language does not match the hardcoded `--lang` parameter. +- **Outcome:** Enabled the ability to "focus" the transcription engine on a single speaker even when the audio input is a complex mix.