WordloopWordloop
WorkMeeting RecordingTechnical Design DocMilestones09 Speaker Labelling

ML — Speaker Diarization

speaker_label populated on TranscriptSegmentProducedEvent from AssemblyAI diarization, and SegmentFeaturesProducedEvent for voice embeddings.

ML — Speaker Diarization

Owner: ML Engineer Domain: ml Complexity: S Prerequisite: Milestone 04 merged

When this slice is complete, every TranscriptSegmentProducedEvent ML emits carries the speaker_label AssemblyAI's diarization assigns, and ML emits SegmentFeaturesProducedEvent carrying voice embeddings so a future session can suggest identity across meetings.

Required Capabilities

  • TranscriptSegmentProducedEvent carries speaker_label populated from AssemblyAI's diarization output.
  • ML emits SegmentFeaturesProducedEvent with a voice embedding for each segment.

Dependencies

  • Milestone 04 (live-transcript-to-final-rebuild) must be merged — the streaming AssemblyAI proxy and TranscriptSegmentProducedEvent contract.

Domain Notes

Coverage gap. No bet-progress test exercises ML's real diarization or voice-feature output. test_milestone_09_speaker_labelling.py's module docstring states the suite instead pushes segments "the way the ML service does it" — POST /transcriptions/{id}/segments with the service token, using hand-written A/B labels — rather than letting a real (or even mocked-diarizing) AssemblyAI session assign them. This proves Core's label→person mapping and its survival through replacement thoroughly, but the actual diarization step (does AssemblyAI's speaker_label output get faithfully carried onto TranscriptSegmentProducedEvent?) is unverified by the bet suite. SegmentFeaturesProducedEvent / voice embeddings are not referenced anywhere in the bet suite at all — permanent ML unit tests (services/wordloop-ml/tests/unit/core/services/test_voice.py, test_speaker_identification.py) may cover this in isolation, but there is no bet-progress acceptance test for it.

Test Cases

Not yet covered by a bet-progress test. There is no test in tests/bets/meeting-recording/test_milestone_09_speaker_labelling.py (or elsewhere in the bet suite) that exercises real AssemblyAI diarization output reaching TranscriptSegmentProducedEvent, or SegmentFeaturesProducedEvent at all.

TestLocationAssertion
(none — not yet covered)—TranscriptSegmentProducedEvent.speaker_label reflecting AssemblyAI's own diarization (as opposed to a test posting hand-written labels directly) is not exercised by any bet-progress test.
(none — not yet covered)—SegmentFeaturesProducedEvent / voice embeddings are not exercised by any bet-progress test.

Completion Checklist

  • Code merged and deployed
  • Bet progress tests pass (./dev test bet meeting-recording)
  • Permanent service tests implemented per testing strategy
  • Code review completed
  • Testing review completed
  • System documentation updated (as applicable)

On this page