Skip to content

feat: add external transcript input support to CLI (Issue #11) - #16

Merged
francozanardi merged 1 commit into
francozanardi:mainfrom
drphero:feat/external-transcript-input
Feb 8, 2026
Merged

francozanardi merged 1 commit into
francozanardi:mainfrom
drphero:feat/external-transcript-input

Conversation

@drphero

@drphero drphero commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements Issue #11 by adding a transcript ingestion path that accepts external transcription files and skips built-in STT, while preserving existing --subtitle-data behavior.

What Changed

  • Added new CLI options:
  • --transcript <path>
  • --transcript-format auto|whisper_json|pycaps_json|srt|vtt (default auto)
  • Added CLI validation:
  • --transcript and --subtitle-data are mutually exclusive
  • --transcript-format requires --transcript
  • Added Python builder APIs:
  • with_transcription(transcription, format="auto")
  • with_transcription_file(path, format="auto")
  • Added new transcript parsing layer:
  • TranscriptFormat enum
  • load_transcription(...) loader
  • Supports whisper_json, pycaps_json, srt, vtt
  • Includes VTT inline timestamp tag parsing (<HH:MM:SS.mmm>)
  • Normalizes all inputs to a pycaps Document with valid word timings
  • Updated pipeline execution precedence:
  1. subtitle_data path (existing behavior, skips transcription + processing)
  2. external transcription (new behavior, skips STT but still processes)
  3. built-in transcription flow (existing default)
  • Updated docs for CLI, examples, and README.
  • Added unit tests for parser coverage, CLI flag validation, and pipeline branching.
  • Updated CI workflow to run unit tests in addition to smoke test.

Backward Compatibility

  • --subtitle-data semantics are unchanged.
  • No new --skip-transcribe flag was added; --transcript implies it.

Test Results

Executed:

.venv/bin/python -m unittest discover -s tests -p "test_*.py"

Result:

  • Ran 14 tests
  • OK

…zanardi#11)

- add TranscriptFormat enum and load_transcription(...) parser/normalizer
- support transcript formats: auto, whisper_json, pycaps_json, srt, vtt
- parse VTT inline timestamp tags and derive word-level timings when needed
- add builder APIs:
  - with_transcription(...)
  - with_transcription_file(...)
- add CLI flags:
  - --transcript
  - --transcript-format
- validate CLI args:
  - reject --transcript + --subtitle-data
  - require --transcript when --transcript-format is set
- update pipeline run precedence:
  1) subtitle data path (existing behavior)
  2) external transcription path (new)
  3) built-in transcribe path (existing)
- update docs (README, docs/CLI.md, docs/EXAMPLES.md)
- add unit tests for transcript loader, CLI flags, and pipeline branching
- update CI to run unit tests alongside smoke test
@francozanardi

Copy link
Copy Markdown
Owner

Hey @drphero, thanks for this job!! :) You even included some tests for pycaps.

@francozanardi
francozanardi merged commit 3a47171 into francozanardi:main Feb 8, 2026
3 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