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:
@@ -42,11 +42,18 @@ multipart/form-data:
|
||||
file — the audio file (mp3, wav, m4a, whatever whisper.cpp accepts)
|
||||
spokenLanguages — zero or more, e.g. spokenLanguages=en&spokenLanguages=pt
|
||||
|
||||
→ { "text": "…", "detectedLanguage": "en" }
|
||||
→ { "text": "…", "detectedLanguage": "en", "conversation": false }
|
||||
→ { "text": "Speaker 1: …\n\nSpeaker 2: …", "detectedLanguage": "en", "conversation": true, "speakers": 2 }
|
||||
→ 400 { "error": "Whisper not configured — PUT /api/transcribe/config first" }
|
||||
→ 502 { "error": "…" } — the whisper.cpp server rejected or failed the request
|
||||
```
|
||||
|
||||
Nobody declares whether a recording is a conversation — the pipeline finds out. A probe on the
|
||||
diarization worker runs alongside transcription; solo dictation comes back as paragraphs exactly as
|
||||
before, and a recording with several voices comes back speaker-labeled with `conversation: true`.
|
||||
Expect diarized recordings to take longer (roughly half realtime on top of transcription). If the
|
||||
worker is down or not configured, everything still transcribes — just never labeled.
|
||||
|
||||
`spokenLanguages` only matters when Whisper's own detection is genuinely unsure — it breaks the tie
|
||||
toward a language you already know the speaker uses. Pass what you know; pass nothing and detection still
|
||||
works, it is just less informed on an ambiguous clip.
|
||||
|
||||
Reference in New Issue
Block a user