Speaker reconciliation + open/re-process any saved session

Reconciliation (the marry-the-signals layer): after transcription, before the recap,
SpeakerReconciler (1) MERGES non-self clusters whose voiceprints are highly similar
(cosine >= 0.82) — fixes a person split across chunks (the real 1-on-1 failure: one
remote came back as 'MH' + 'Unknown_0'); and (2) NAMES remaining non-self clusters
from transcript CONTENT via the gateway LLM (people addressed by name / self-intros),
conservative + confidence-gated, keeping the placeholder when unrevealed. The
mic-channel self is protected and never reassigned. Voice does the segmentation; the
fingerprint-merge fixes splits; the LLM adds the content signal visual/voiceprint lack.

- SpeakerReconciler: pure cosine merge (tested) + LLM content-naming pass; rewrites
  speakers.json before recap. SessionController.finishBackend shares one model lookup
  for reconcile + recap. Gated by settings.reconcileSpeakers (default on).
- Open saved session: menu 'Open saved session…' → folder picker. Edits it if already
  transcribed, else reconstructs inputs from disk (visual_timeline vision segs +
  channel self-spans) and runs transcribe → reconcile → recap, then opens the editor.
  Lets you evaluate/correct ANY past call, not just the in-memory last one.

Note (from real Signal data): visual naming is unreliable on Signal (sparse, misread
initials, lowercase/center names) — so reconciliation + the editor (which teaches
voiceprints on confirm) carry it; the editor remains the human arbiter. 59/59 XCTest.
This commit is contained in:
Grant Gilliam
2026-06-08 11:54:41 -05:00
parent f77f33ce04
commit 6d0c8be8c9
7 changed files with 317 additions and 39 deletions
+4
View File
@@ -103,6 +103,10 @@ struct MenuBarView: View {
Text(transcriptText).font(.caption).foregroundStyle(transcriptColor)
}
}
Button("Open saved session…") { session.openSavedSession() }
.buttonStyle(.link).font(.caption)
.disabled(transcriptProcessing)
}
}
+1
View File
@@ -25,6 +25,7 @@ struct SettingsView: View {
TextField("Your name", text: $settings.selfName)
.textFieldStyle(.roundedBorder)
Toggle("Auto-send recordings to backend", isOn: $settings.autoSendOnStop)
Toggle("Reconcile speakers (merge splits + name from content)", isOn: $settings.reconcileSpeakers)
Toggle("Build readable recap (topics + highlights)", isOn: $settings.recapEnabled)
HStack {
Picker("Default recap template", selection: $settings.defaultTemplateId) {