Skip to content

[Tier 2] Merge tiny/adjacent same-speaker diarization fragments before labeling #65

@fmasi

Description

@fmasi

Symptom: Too many speaker boxes.

Root cause

TranscriberCore/SpeakerAssignment.swift assigns speakers purely by max temporal overlap (around :150-166) with no merging of short/adjacent same-speaker fragments. When the diarizer splits one person into fragments, this yields multiple Speaker N labels. buildSpeakerMap (:231) numbers speakers by first appearance with no fragment collapsing.

Proposed fix

  • Before buildSpeakerMap, collapse diarization turns shorter than a configurable threshold (e.g. 0.5s) into the temporally-dominant neighbor.
  • Optionally merge adjacent turns of the same speaker.
  • Add a unit test in Core.

Acceptance criteria

  • Short fragments no longer create standalone speakers.
  • Unit test added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions