Repository navigation
feat(import): credit WebVTT voice spans as each line's speaker - #689
Merged
Merged
Conversation
An imported WebVTT transcript now reads a cue's voice span, <v Name> or <v.class Name>, closed by </v> or not, as the line's speaker, so the people a file names join the namespace like other named speakers. A cue with two voices becomes two lines sharing its time by word count; cues without a voice are read as before. A YouTube cue starting with a line of one space is no longer dropped. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QFUNzy1QZy5HhKAyJxTAYJ
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.
Requested by Adeel · project thread
Description
Before: an imported WebVTT transcript kept
<v Name>voice tags as text (or dropped them), and every line was left without a speaker, so the people a caption file names had to be assigned by hand.After: a cue's voice span,
<v Name>or<v.class Name>, closed by</v>or not, becomes the line's speaker, and those speakers join the namespace's people like any other named speaker. A cue with two voices becomes two lines that share its time by word count. The tags are left out of the text, and cues without a voice are read as before. A YouTube caption cue starting with a line of one space is no longer lost.How: the WebVTT reader in
domain/ingest.pyparses voice spans per cue and splits multi-voice cues.Motivation and Context
Item from the personal feature plan sheet (bring existing transcripts:
<v.class>not parsed).Screenshots (if appropriate):
n/a
Steps to reproduce (if appropriate):
Import a
.vttfile with cues like<v Alice>Hello</v> <v Bob>Hi there: the transcript shows two lines, credited to Alice and Bob.Types of changes
!in the title)Checklist:
make hookschecks it on commit).tests/domain/test_importing.py).docs/accordingly (docs/processing.md#importing-transcripts).## UnreleasedinCHANGELOG.md. Written aschangelog.d/vtt-voices.md, per build(release): changelog fragments in changelog.d/ instead of one Unreleased section #581.Done questions (AGENTS.md)
.envedit or manual step.docs/requirements.mdname the checks.make openapi). No API change.Local CI: the container runs several times slower than usual, so I ran the changed tests directly:
test_importing.py(8 passed), ruff check and format clean, requirements check passes. GitHub CI decides the merge.Generated by Claude Code