Commit Graph
12 Commits
Author SHA1 Message Date
lukehemmin 20777386fe fix: normalize faster-whisper segments to dicts + in-proc auto-worker
Colab run 3 (A100) surfaced three GPU/API-path bugs mocks couldn't catch:

1. faster-whisper yields namedtuple Segments, but batch/bench consume
   them as dicts (.get) -> AttributeError 'Segment' has no attribute
   'get' on every real transcription. Engine now normalizes segments
   to dicts (_to_dict_segments) at the boundary.

2. API TranscribeOptions carries engine-irrelevant keys (formats,
   timestamps, glossary_id, post_correction, diarize); worker's
   TranscriptionOptions(**job.options) crashed with TypeError. Worker
   now filters job.options to TranscriptionOptions.__slots__.

3. in-proc server never consumed its own queue (jobs stayed queued
   forever). Added opt-in Settings.auto_worker (default off): lifespan
   starts a daemon Worker thread for inproc backend, stopped on
   shutdown. Notebook enables it via LUKESCRIBE_AUTO_WORKER=true so the
   API upload -> completed flow works end to end.

Notebook: bench manifest now uses clips schema (audio_path/duration_sec/
entities); cell 22 reads error_message/error_code; upload poll window
raised to 4min (first-run model download).

+ 5 tests (namedtuple/dict segments, API-style options, auto_worker
on/off); 136 tests pass, ruff clean.
2026-08-12 17:32:18 +09:00
lukehemmin 741bce9fc6 fix: split 'cuda:N' into device+device_index for CTranslate2
Colab A100 run exposed a GPU-only bug: DeviceManager returns
selected_device='cuda:0' and the engine passed it verbatim to
faster-whisper, but CTranslate2 only accepts device='cuda' with a
separate device_index arg -> 'unsupported device cuda:0' on every GPU
transcription. Fix: FasterWhisperEngine._split_device() splits
'cuda:N' -> ('cuda', N) and passes device_index to WhisperModel.

Notebook: server cell now pkills stale servers (old process holds
port 8000 and 401s on new keys since KeyStore loads at startup),
sets LUKESCRIBE_API_KEY_FILE explicitly, and verifies auth with
RAW_KEY before proceeding; worker cell guards read_result() is None.

+ 4 unit tests (device split contract), 131 tests pass, ruff clean.
2026-08-12 17:20:12 +09:00
lukehemmin 236ca0acf4 fix: colab notebook — locate cuDNN/cuBLAS .so via find
nvidia-cudnn-cu12/cublas-cu12 are namespace packages with no
__file__, so os.path.dirname() raised TypeError and the install cell
aborted. Locate libcublas.so/libcudnn.so under site-packages with
find and build LD_LIBRARY_PATH from those. Also add a CTranslate2
GPU check cell (ctranslate2.get_cuda_device_count) right after
install so GPU usability is confirmed before transcription.
2026-08-12 17:11:14 +09:00
lukehemmin fb936e1953 fix: colab notebook — CUDA 13 runtime + raw key capture
Colab now ships CUDA 13.0 (driver 580); CTranslate2 wheels are CUDA 12
so GPU init fails with 'unsupported device cuda:0'. Install
nvidia-cublas-cu12/nvidia-cudnn-cu12 and set LD_LIBRARY_PATH in the
install cell; transcription cell reports failures cleanly.

API smoke: api_keys.json stores only digests (raw key shown once), so
the notebook now captures RAW_KEY at creation and uses it for upload
instead of reading the digest file (fixes 401).
2026-08-12 17:07:23 +09:00
lukehemmin f6e5ae662f fix: colab notebook — idempotent clone (pull if repo exists)
Cell 1 now detects an existing /content/luke_scribe/.git and runs
git fetch + checkout feat/full-platform + pull --ff-only instead of
rm -rf + clone, so re-running the notebook updates instead of wiping
local changes.
2026-08-12 17:02:53 +09:00
lukehemmin f385734630 fix: colab notebook — use system pip instead of venv
Colab 'python3 -m venv' fails with ensurepip error (no .venv created,
so every subsequent cell hit 'command not found'). Switch to system pip
(Colab standard) and run the API server via nohup background with log
fallback diagnostics.
2026-08-12 16:55:21 +09:00
lukehemmin 0d90845ac6 docs: add Colab GPU test notebook for real-model verification
CPU-only dev env verified via mocks; the notebook runs the full real
pipeline on Colab Pro T4: clone → ffmpeg/venv install → detect (GPU
capability tier) → 127 unit/integration tests → sample TTS (KO+EN
tech terms) → real faster-whisper transcription → hotword/postprocess
→ API smoke → benchmark.
2026-08-12 16:39:25 +09:00
lukehemmin 7327145d7a feat: implement full-platform STT API (v2.3 consensus plan)
Batch+realtime transcription API: faster-whisper engine w/ EngineOwner
(single GPU owner, OOM downgrade chain, persisted attempted_profiles),
hardware-adaptive device manager (T0-T3 VRAM tiers), Redis/in-proc job
queue w/ leases + crash recovery, postprocess (glossary/rules/LLM w/
egress guard), privacy-first result store (UUID keys, source deleted
after transcribe), retention sweeper, API-key auth (HMAC digests,
scopes, job ownership), WebSocket realtime lane (LocalAgreement),
CLI (detect/transcribe/bench/serve/key), Docker, benchmark runner.

127 mock-based tests pass; ruff clean. Includes verification checklist
and autoplan review notes.
2026-08-12 16:01:21 +09:00
lukehemmin b7c30f8b71 WIP: define Luke Scribe v0.1 design
[gstack-context]
Decisions: Validate the transcription core and benchmark gate before API, queue, and realtime work; preserve five expansion contracts.
Remaining: Build the benchmark dataset and implement detect/transcribe/bench.
Skill: /office-hours
[/gstack-context]
2026-08-10 17:40:33 +09:00
lukehemminandClaude Opus 4.8 612b353105 docs(omc): seed project memory — directives, notes, tech stack
Populate the previously-empty .omc/project-memory.json so teammates and
future OMC sessions inherit context: 4 user directives (SoT location,
greenfield/next-step, locked design decisions, measurement-gated residual),
3 notes (architecture, tech stack, env), and the decided tech stack.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 12:30:17 +09:00
lukehemminandClaude Opus 4.8 84faa121fe docs: resolve open questions, recompute ambiguity ~10%→~5% (v2.3)
Fold post-plan decisions into the spec and consensus plan:
- Q1 deploy HW: undecided/mixed → delegate to hardware-adaptive auto-sizing
- Q2 model strategy: collapse to single turbo model if P1 bench entity ≥95%
- Q3 cancellation: cooperative (segment-boundary) is sufficient; no hard-kill
- Q4 concurrency N: delegate to boot-time auto-sizing (AC-8 = ≤5s within auto N)

Recompute clarity with the deep-interview model (Goal 0.96 / Constraint 0.95
/ Success 0.95 → Total 0.954): ambiguity ~10% → ~5%. Residual is now entirely
measurement/code-gated (AC-4 R-WER baseline, hybrid→single confirmation,
CT2 GIL) — next lever is P1 bench, not further interview.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 11:07:36 +09:00
lukehemminandClaude Opus 4.8 fbe13dddcc chore: initial commit — planning docs and omc project context
Greenfield setup for luke_scribe (local STT transcription API). No source
code yet; this captures the completed design phase so teammates can ramp
through oh-my-claudecode.

Includes:
- .omc/plans/consensus-luke-scribe-stt-api.md — consensus impl plan v2.2
- .omc/specs/deep-interview-luke-scribe-stt-api.md — deep-interview spec
- .omc/artifacts/ask/{codex,gemini}-*.md — external review (CCG)
- .omc/project-memory.json — omc project memory
- opencode.json, .claude/settings.json — shared tooling config
- .gitignore — excludes ephemeral omc state/session logs and local settings

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 10:08:17 +09:00