Repository navigation
feat: show the transcript while speakers are still being identified (#134) - #137
Draft
raphaelm22 wants to merge 2 commits into
Draft
raphaelm22 wants to merge 2 commits into
raphaelm22 wants to merge 2 commits into
Conversation
…bscureAintSecure#134) pyannote takes about as long as the recording on a CPU, and the transcript waited for it. Display and save the transcript as soon as transcription finishes; speaker labels fill in when diarization completes. The preview shares segment objects with DiarizationWorker, which only sets .speaker, so edits made meanwhile reach the final transcript. A preview reopened from disk gets its edits copied over before the final display. Summaries, chat context and the job queue still wait for the final result.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #134.
Summary
With pyannote diarization on, the transcript stayed hidden until diarization finished. That can take about as long as the recording on a CPU: 34 minutes for a 31-minute meeting whose transcription took 5.
The transcript is now displayed and saved as soon as transcription finishes. Speaker labels fill in when diarization completes.
_start_diarizationcalls the new_show_transcript_previewonce the worker has started:display_transcriptplus_save_transcript, and the progress bar stays up;_write_transcript_for_session.DiarizationWorker, which only ever sets.speaker. Text edited while diarization runs is already in the final result._finish_diarized_transcriptcopies its edits onto the final result before displaying it, on both the finished and error paths. Segments are matched by position and timestamps; anything else is treated as a different transcript and left alone._display_final_transcript. Auto-summary needs the speakers, and the queue is still busy.Tests
tests/test_transcript_preview.py, 17 new tests, using the stub-self pattern fromtest_system_monitor_start.py.DiarizationWorkeris patched withautospec. The tests cover:_carry_over_edits: the edit reaches the final result, and same object, other timestamps, other length and nothing shown are all ignored;_finish_diarized_transcript;Without the change, 14 of the 17 fail. Full suite: 425 passed.
🤖 Generated with Claude Code