76611af7e0
- whisper-server stack: second container (port 8086) running the English-trained small.en-tdrz model with -tdrz; image patched (speaker-turn.patch) to expose speaker_turn_next per segment in verbose_json like the cli example does - core/whisper Diarization: merges the tdrz pass's TURN TIMES onto the quality transcript as alternating 'Sprecher 1/2:' labels, splitting segments when a turn falls inside them; no turns detected = no labels (never mislabels); 6 unit tests - RemoteWhisperEngine gains a diarize flag (sends tinydiarize=true, parses speaker_turn_next); WhisperEngine.Segment carries the flag - RecorderService: optional second pass on the diarize server after the final pass; failures keep the unlabeled transcript - Settings: Diarize server URL (persisted; empty disables) - validated infrastructure locally: patched image builds, tdrz model downloads from akashmjn/tinydiarize-whisper.cpp, speaker_turn_next present in responses; synthetic espeak audio does not trigger the model's turn tokens — real two-person speech needed for the end-to-end check
16 lines
662 B
Diff
16 lines
662 B
Diff
diff --git a/examples/server/server.cpp b/examples/server/server.cpp
|
|
index b87ef27..9e13ceb 100644
|
|
--- a/examples/server/server.cpp
|
|
+++ b/examples/server/server.cpp
|
|
@@ -1090,6 +1090,10 @@ int main(int argc, char ** argv) {
|
|
segment["end"] = whisper_full_get_segment_t1(ctx, i) * 0.01;
|
|
}
|
|
|
|
+ if (params.tinydiarize) {
|
|
+ segment["speaker_turn_next"] = whisper_full_get_segment_speaker_turn_next(ctx, i);
|
|
+ }
|
|
+
|
|
if (params.diarize && pcmf32s.size() == 2) {
|
|
segment["speaker"] = estimate_diarization_speaker(
|
|
pcmf32s,
|