conversations come back as conversations

A probe on the torch stage worker (~/dockers/torch-worker) runs beside every
transcription and decides what the recording is: solo dictation returns as
paragraphs exactly as before, several voices return speaker-labeled with
conversation: true. Nobody declares which — the caller cannot know.

Transcription and the worker each get a serial FIFO queue on their own
resource, so the probe costs a solo memo nothing and multi-user traffic
stays fair. The worker is optional and best-effort throughout: unreachable
or failing, everything still transcribes, just never labeled.

Speaker attribution is segment-granularity by maximal turn overlap —
whisper.cpp's own timestamps, no alignment stage. If boundaries prove
sloppy, wav2vec2 alignment returns as a worker endpoint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-25 04:27:14 +00:00
co-authored by Claude Fable 5
parent bd08f9a5fe
commit dd3dbb611b
10 changed files with 416 additions and 20 deletions
+9
View File
@@ -12,6 +12,15 @@ audio is not.
- **`POST /api/transcribe/transcribe`** — send an audio file, get back its text and the language Whisper
detected. Two-pass under the hood (detect, then transcribe in that language) so a low-confidence guess
never quietly defaults to English.
- **Conversations come back as conversations.** Nobody declares what a recording is — a probe on the
diarization worker runs alongside every transcription and finds out. Solo dictation returns as
paragraphs, exactly as before; a recording with several voices returns speaker-labeled
(`Speaker 1: …`) with `conversation: true` and a speaker count. The worker is optional: without it,
or if it fails mid-request, everything still transcribes — just never labeled. See
`~/dockers/torch-worker` for the worker itself.
- **Fair queueing for a multi-user server.** Transcription and diarization each run one job at a time
behind their own queue, in arrival order — and on different hardware, so the conversation probe costs
a solo memo nothing.
- **A file-browser task.** Right-click an `.mp3`, `.wav` or `.m4a` and transcribe it without a model
turn — the task is a plain script that calls this plugin's own route and files the result next to the
original.