Repository navigation
feat(transcription): AssemblyAI with speaker labels - #19
bryangruneberg wants to merge 1 commit into
Conversation
…tional extra Adds a second transcription backend next to local Whisper, selected with `transcriber: whisper | assemblyai` (default unchanged: whisper). AssemblyAITranscriber has the same interface as WhisperTranscriber and adds: - speaker diarisation: segments carry a speaker, the transcript renders as **[mm:ss] Speaker A:** ..., and the summariser is given "Speaker A: ..." lines (summary_input) so action items can name an owner; - upload as 16 kHz mono FLAC via ffmpeg. The recorder's 48 kHz WAV is ~11 MB/min, and a 34-minute meeting (377 MB) had its upload cut off mid-TLS; FLAC is lossless for what the model hears and ~10x smaller; - upload retries on a dropped connection; - submit()/wait() split so a caller can keep the transcript id and resume polling instead of re-uploading; AssemblyAIError carries status_code / transient / remote_failed for callers deciding whether to retry; - a missing API key is reported at transcription time, so the app still opens and records without one. build_transcriber(config) replaces the two duplicated construction blocks in app.py (startup and settings-saved). Settings gains a transcription picker. Packaging: openai-whisper moves from core dependencies to a `whisper` extra (torch is several GB and not always available for the newest Python). `all` still includes it, so setup.sh's `pip install -e .[all]` installs exactly what it did before; a new `assemblyai` extra is the cloud-only set. CI installs requests and runs tests/test_assemblyai.py. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
This is really strong work @bryangruneberg. Reading it end-to-end there's a lot of care in the parts that matter: uploading, retries, the split between What I like:
Packaging change is a breaking change for existing installs, but handled well: Moving Tests are excellent. Injected
Minor nits (not blocking):
Rebased locally on top of #18 which just merged — clean rebase, 147 tests pass, ruff clean. Merging. |
|
Merged as commit 9aa486e on main (squashed locally and pushed because my |
|
Woop Woop! Glad Assembly made it in 😁 |
(Keeps Whisper as an optional extra)
Adds a second transcription backend next to local Whisper, selected with
transcriber: whisper | assemblyai(default unchanged: whisper).AssemblyAITranscriber has the same interface as WhisperTranscriber and adds:
build_transcriber(config) replaces the two duplicated construction blocks in app.py (startup and settings-saved). Settings gains a transcription picker.
Packaging: openai-whisper moves from core dependencies to a
whisperextra (torch is several GB and not always available for the newest Python).allstill includes it, so setup.sh'spip install -e .[all]installs exactly what it did before; a newassemblyaiextra is the cloud-only set.CI installs requests and runs tests/test_assemblyai.py.