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.
This commit is contained in:
2026-08-12 16:01:21 +09:00
parent b7c30f8b71
commit 7327145d7a
82 changed files with 7351 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
[project]
name = "luke-scribe"
version = "0.1.0"
description = "내부용 로컬 STT 전사 API — faster-whisper, hardware-adaptive, privacy-first"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"pydantic>=2.7",
"pydantic-settings>=2.3",
"typer>=0.12",
"rich>=13.7",
"psutil>=5.9",
"nvidia-ml-py>=12.535",
"huggingface-hub>=0.24",
]
[project.optional-dependencies]
# 엔진 — transcribe/bench (faster-whisper/CTranslate2)
engine = ["faster-whisper>=1.0.3", "av>=11"]
# GPU CUDA 런타임 (faster-whisper GPU 추론 시)
gpu = ["nvidia-cublas-cu12", "nvidia-cudnn-cu12"]
# 동기 배치 API (serve)
api = ["fastapi>=0.110", "uvicorn[standard]>=0.29", "python-multipart>=0.0.9"]
# P2 비동기 큐 (Redis/RQ no-fork)
queue = ["redis>=5.0", "rq>=1.16"]
# P5 옵션
diarize = ["pyannote.audio>=3.1"]
llm = ["openai>=1.30"]
[dependency-groups]
dev = ["pytest>=8.2", "ruff>=0.5", "httpx>=0.27"]
[project.scripts]
luke-scribe = "luke_scribe.cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/luke_scribe"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-q"
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP", "B"]
ignore = ["E501"]
[tool.ruff.lint.per-file-ignores]
# FastAPI/typer는 Depends()/Option() 호출을 인자 기본값에 쓰는 패턴이 표준
"src/luke_scribe/api/**" = ["B008"]
"src/luke_scribe/cli.py" = ["B008"]