docs: update history.md with today's work (Phases 10-12)

This commit is contained in:
Adolfo Reyna
2026-02-28 19:37:25 -05:00
parent 8b88df8b17
commit f68111123d
+22
View File
@@ -80,3 +80,25 @@ The project now features a high-performance, Apple Silicon-optimized pipeline th
- Implemented a background `ingest_worker` thread to handle HTTP POST requests without stalling the audio processing.
- **Flat JSON Schema:** Used a key-value format as requested (e.g., `original`, `es`, `en`, `fr`).
- **Reliability:** Integrated exponential backoff retries (1s to 15s) to handle network or server failures.
## Phase 10: CLI Configuration & Documentation
- **Goal:** Make the tool fully configurable without editing the code.
- **Approach:**
- Integrated `argparse` to allow dynamic selection of translation languages (`-es`, `-en`, `-ar`, `-fr`), data ingestion (`-i`), and audio device (`-d`).
- Added device listing capability (`-l`).
- Excluded the `venv` directory from git and generated `requirements.txt`.
- Created a comprehensive `README.md` containing setup instructions, usage examples, and a technical note on universal models (like NLLB-200).
- **Fix:** Added missing `sentencepiece` dependency required by MarianMT models.
## Phase 11: Speed Optimization (Quantization & Streaming)
- **Goal:** Reduce latency and improve real-time feedback.
- **Approach:**
- **Streaming Mode (`-s`):** Implemented a 1-second rolling draft transcription that continuously updates the console while the user is still speaking.
- **Quantization (`-q`):** Added support for dynamically swapping to the 4-bit quantized Whisper model (`mlx-community/whisper-small-mlx-4bit`) for faster inference on Apple Silicon with lower memory bandwidth.
## Phase 12: Accuracy & Context Optimization
- **Goal:** Improve translation quality of short or broken audio chunks.
- **Approach:**
- **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:** When `-c` is enabled, English translations are buffered until a definitive punctuation mark (`.`, `?`, `!`) is reached, preventing grammatical errors caused by translating partial sentences.