Skip to content

Raw vs derived transcripts: speaker-labeled transcript.txt from WhisperX json#15

Merged
hollygrimm merged 2 commits into
mainfrom
transcript-raw-derived
Jul 18, 2026
Merged

Raw vs derived transcripts: speaker-labeled transcript.txt from WhisperX json#15
hollygrimm merged 2 commits into
mainfrom
transcript-raw-derived

Conversation

@hollygrimm

Copy link
Copy Markdown
Collaborator

Summary

Implements the raw vs derived transcript design now documented in docs/SCHEMA.md:

  • transcript.json = immutable raw diarization layer. Speaker labels stay SPEAKER_NN forever, so re-mapping is always possible (two labels identified as the same person stay distinguishable).
  • parts[].speakers in metadata.json is the only place human speaker identifications live (journal-owned, hand-edited).
  • transcript.txt = derived view, regenerated from the json + mapping by Journal-Utilities/scripts/apply_speaker_names.py (idempotent; unmapped labels stay SPEAKER_NN).

What changed

  • 421 items upgraded from YouTube-caption text to speaker-labeled WhisperX text. The diarized segments were already sitting in each item's transcript.json (carried over by the June refactor) — only the txt was still captions. Previous caption text is preserved as captions/youtube_captions.txt per item (no data loss in the working tree; also still in git history).
  • 8 items reformatted to the canonical rendering (consecutive same-speaker segments merged under one label).
  • GuestStream_128 + Session_023: transcript.json reverted to raw SPEAKER_NN (names had been substituted in-place; they now live only in parts[].speakers and the derived txt — txt output is unchanged in content).
  • 7 legacy AssemblyAI-shaped transcript.json files untouched (frozen legacy raw layer, per schema).
  • INDEX.json / INDEX.md regenerated; validate_journal.py passes (missing_manifest_videos: 0, no forbidden files).

Verification

  • Regenerated text is byte-identical to the pre-reorg .simple.txt outputs (checked against commit 9da9266) for unmapped items.
  • Re-running the script reports 435 unchanged / 0 writes — fully idempotent.
  • Transcription status after: 456 diarized / 69 caption-only (was 73 / 452). The 69 remainder is the true WhisperX GPU queue.

Speaker-name mapping remains the manual step: record parts[].speakers in an item's metadata and re-run the script.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UoVcFP7bBu92mK6RqM5nPG

hollygrimm and others added 2 commits July 18, 2026 12:10
transcript.json is the immutable raw diarization layer (SPEAKER_NN
forever); transcript.txt is a derived view regenerated from the json
plus the journal-owned parts[].speakers mapping. Provenance is encoded
by file shape (see the new table) — no metadata flag needed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UoVcFP7bBu92mK6RqM5nPG
Regenerate transcript.txt for every item whose transcript.json carries
WhisperX diarization (apply_speaker_names.py, per the raw/derived
design in docs/SCHEMA.md):

- 421 items upgraded from YouTube-caption text to speaker-labeled
  WhisperX text (SPEAKER_NN until parts[].speakers maps names); the
  previous caption text is preserved as captions/youtube_captions.txt
- 8 items with existing speaker text reformatted to the canonical
  rendering (consecutive same-speaker segments merged)
- GuestStream_128 + Session_023 transcript.json reverted to raw
  SPEAKER_NN labels (names had been baked in; they now live only in
  parts[].speakers and the derived txt)
- legacy AssemblyAI-shaped transcript.json files left untouched
- INDEX.json / INDEX.md regenerated; validate_journal.py passes

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UoVcFP7bBu92mK6RqM5nPG
@hollygrimm
hollygrimm merged commit 3101d10 into main Jul 18, 2026
2 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.

1 participant