Implement SessionTag-based speaker time-range tracking in recording UI #13

Closed
opened 2026-05-23 01:19:08 +00:00 by Mark · 0 comments
Owner

Parent Issue

#6 — No speaker/subject assignment during live recording
#11 — Implementation plan

Description

The SessionTag entity (tagType=TYPE_SPEAKER) already exists in the data model but is not used during recording. Currently, speaker assignment only sets TranscriptSegment.speakerId at segment insertion time. Time-range speaker tracking via SessionTag allows:

  • Tracking "who was speaking when" independently of segment boundaries
  • Supporting future ML diarization that produces speaker time-ranges
  • Showing speaker transitions in a timeline view

Scope

  • Create a RecordingTagViewModel (or extend RecordingViewModel) that manages active SessionTag entries during recording
  • When the user selects a speaker chip during recording:
    1. Close any previous TYPE_SPEAKER SessionTag (set endOffsetMs)
    2. Insert a new SessionTag(tagType=TYPE_SPEAKER, referenceId=speaker.id, startOffsetMs=elapsedMs)
  • When recording stops, close any open TYPE_SPEAKER tags
  • Expose activeSpeakerTags: StateFlow<List<SessionTag>> for UI consumption
  • Add SessionTagRepository DI injection to RecordingViewModel (currently only has SegmentRepository, SessionRepository, SpeakerRepository, SubjectRepository)

Acceptance Criteria

  • Selecting a speaker during recording creates a SessionTag with TYPE_SPEAKER
  • Deselecting a speaker (tapping the same chip) closes the open SessionTag
  • Switching speakers closes the previous tag and opens a new one
  • Stopping recording closes all open TYPE_SPEAKER SessionTags
  • Existing segment-level speaker assignment (TranscriptSegment.speakerId) continues to work

Dependencies

  • None (data model already exists: SessionTag, SessionTagDao, SessionTagRepository)
## Parent Issue #6 — No speaker/subject assignment during live recording #11 — Implementation plan ## Description The `SessionTag` entity (tagType=TYPE_SPEAKER) already exists in the data model but is not used during recording. Currently, speaker assignment only sets `TranscriptSegment.speakerId` at segment insertion time. Time-range speaker tracking via `SessionTag` allows: - Tracking "who was speaking when" independently of segment boundaries - Supporting future ML diarization that produces speaker time-ranges - Showing speaker transitions in a timeline view ## Scope - Create a `RecordingTagViewModel` (or extend `RecordingViewModel`) that manages active `SessionTag` entries during recording - When the user selects a speaker chip during recording: 1. Close any previous TYPE_SPEAKER SessionTag (set `endOffsetMs`) 2. Insert a new `SessionTag(tagType=TYPE_SPEAKER, referenceId=speaker.id, startOffsetMs=elapsedMs)` - When recording stops, close any open TYPE_SPEAKER tags - Expose `activeSpeakerTags: StateFlow<List<SessionTag>>` for UI consumption - Add `SessionTagRepository` DI injection to RecordingViewModel (currently only has SegmentRepository, SessionRepository, SpeakerRepository, SubjectRepository) ## Acceptance Criteria - [ ] Selecting a speaker during recording creates a SessionTag with TYPE_SPEAKER - [ ] Deselecting a speaker (tapping the same chip) closes the open SessionTag - [ ] Switching speakers closes the previous tag and opens a new one - [ ] Stopping recording closes all open TYPE_SPEAKER SessionTags - [ ] Existing segment-level speaker assignment (TranscriptSegment.speakerId) continues to work ## Dependencies - None (data model already exists: `SessionTag`, `SessionTagDao`, `SessionTagRepository`)
Mark closed this issue 2026-05-25 16:36:15 +00:00
Sign in to join this conversation.
No description provided.