Skip to content

Add structured speaker editing, view, and DOCX export - #1587

Merged
raivisdejus merged 4 commits into
chidiwilliams:mainfrom
ciklois-neo:feature/structured-speaker-workflow
Aug 22, 2026
Merged

raivisdejus merged 4 commits into
chidiwilliams:mainfrom
ciklois-neo:feature/structured-speaker-workflow

Conversation

@ciklois-neo

Copy link
Copy Markdown
Contributor

Summary

  • persist diarization results in a dedicated speaker field instead of embedding labels into transcript text
  • add an editable Speaker column to the timestamp editor, with inline choices, custom names, and multi-row assignment
  • add a Speakers view with stable colors, explicit names, consecutive-turn grouping, and per-speaker filtering
  • add DOCX – Speakers export with matching colored/bold speaker labels, normal black transcript text, and optional timestamps
  • retain speaker context in TXT/SRT/VTT exports without polluting the stored transcript text
  • safely migrate existing databases without heuristically parsing legacy Name: text prefixes

Behavior

Identify Speakers now saves clean transcript text and structured speaker metadata. The Speakers view and DOCX export share the same grouping and color model, so the on-screen result and Word document remain consistent. Both features are available only when at least one speaker is assigned.

In the timestamp table, users can edit a speaker per row, create a new speaker name, or assign one speaker to multiple selected rows. The generated Word document is a normal, editable .docx file.

Motivation

This completes the editing and export side of the known-speaker workflow discussed in #1043 and complements #1586. Importantly, the structured speaker model is independent of the diarization backend: MSDD, Sortformer, or a future model can all populate the same field and use the same editor, view, filters, and exports.

That makes this useful beyond the current MSDD speaker-count implementation, especially for interviews, meetings, hearings, and court-style transcripts that need review and document export after diarization.

Additional UI fixes

  • keep the audio control area compact so the transcript table uses the available height
  • reset rich speaker-label formatting when returning to the plain Text view

Testing

  • 53 passed, 30 skipped in the focused schema, editor, identification, export, and DOCX plugin suites
  • database migration test confirms existing transcript text is preserved
  • generated DOCX XML is validated and checked for speaker names, colors, and optional timestamps
  • user validation on a 30-minute Hungarian room recording with three participants
  • manual Windows testing confirmed speaker editing, filtering, and the colored Word export

@raivisdejus

Copy link
Copy Markdown
Collaborator

@ciklois-neo Nice feature!

A thing I would change is - do not show Speaker column while there is no speakers at all identified. For people not needing the speaker identification that would make UI a bit cleaner. Speaker column should show up once there is any speaker data to show.

Apart from that nice addition.

@raivisdejus
raivisdejus enabled auto-merge (squash) August 22, 2026 11:14
@codecov

codecov Bot commented Aug 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.10024% with 75 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.46%. Comparing base (749001c) to head (eb62306).

Files with missing lines Patch % Lines
...ion_viewer/transcription_segments_editor_widget.py 63.90% 48 Missing ⚠️
...ranscription_viewer/transcription_viewer_widget.py 91.85% 11 Missing ⚠️
buzz/transcriber/docx_writer.py 89.55% 7 Missing ⚠️
.../transcription_viewer/export_transcription_menu.py 80.00% 7 Missing ⚠️
buzz/db/dao/transcription_segment_dao.py 85.71% 1 Missing ⚠️
buzz/plugins/export_docx/plugin.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1587      +/-   ##
==========================================
- Coverage   83.56%   83.46%   -0.10%     
==========================================
  Files         108      110       +2     
  Lines       12112    12472     +360     
==========================================
+ Hits        10121    10410     +289     
- Misses       1991     2062      +71     
Flag Coverage Δ
Linux 82.60% <82.10%> (-0.03%) ⬇️
macOS 83.01% <82.10%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@raivisdejus
raivisdejus merged commit 646c61b into chidiwilliams:main Aug 22, 2026
15 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants