Preserve Gemini speaker turns in mixed-audio transcripts

IL
4d ago
+207-5

Summary

Intent: Gemini batch words were treated as personal-microphone audio, collapsing distinct speakers into the owner. Preserve speaker turns for new recordings and recover saved Gemini transcripts without retranscription.

Preserve manual speaker assignments and verified source-channel restoration. Normalize legacy source transcripts before batch refinement so retranscription cannot restore the same incorrect personal-microphone attribution.

Demo

Synthetic regression fixture: before and after

Synthetic reproduction: Speaker 0: Hello. followed by Speaker 1: Hi. previously rendered as a single owner block on channel 0. The corrected render input uses mixed capture and retains both speaker labels. Regression tests also check that live microphone channels remain unchanged and manual speaker assignments survive.

Verification

  • Gemini adapter unit tests: 14 passed.
  • Transcript crate tests: 163 passed.
  • Focused desktop query/render tests: 53 passed.
  • Desktop typecheck, frontend production build, formatting, ESLint, license-boundary checks, and repository script tests passed.
  • Desktop suite: 4,194 passed; three failures caused by the local timezone/production API environment all passed in a targeted rerun with UTC and the default development API URL.
  • Native macOS 1.4.31 app bundle built and signature verified; persistence regression tests: 9 passed; database crate tests: 278 passed.
  • Latest GitHub CI, desktop JS/i18n, CLI, mobile, lint, formatting, PR description, and workflow-security checks passed.
  • End-to-end local UI verification of the patch was not completed: macOS blocks the ad hoc-signed database extension. The user chose to restore the official notarized app rather than relax local library validation. No signing exception or entitlement change is included in this PR; the upstream release uses the project's Developer ID.
  • The offline workflow scan reports 335 pre-existing findings in untouched workflows; no workflow files changed.

Summary by cubic

Fixes Gemini batch transcripts being treated as personal-microphone audio, which collapsed all speaker turns into a single owner block and lost speaker labels.

  • New Gemini batch output is marked as mixed capture (channel 2) instead of personal mic (channel 0).
  • Existing affected transcripts are repaired in memory at render time, without rewriting saved words or requiring retranscription.
  • Legacy transcripts are normalized before batch refinement so retranscription cannot restore the incorrect personal-mic attribution.
  • Manual speaker assignments and verified source-channel restorations are preserved.