Summary
Add a browser-only import flow for pasted plain text or .txt transcript files, then split the text into draft subtitle cues. This is a high-value way to support caption creation without adding ASR or server-side processing.
Why this is in scope
- Runs entirely in the browser.
- Complements the existing "start from scratch" flow.
- Helps users who already have a transcript from another tool.
- Keeps AI transcription as a non-goal while making generated transcripts easier to edit.
Implementation plan
-
Add segmentation utilities.
- Create
lib/transcript-segmentation.ts.
- Support these modes first:
- Split by non-empty lines.
- Split by sentence punctuation.
- Split by maximum character count.
- Output
Subtitle[] with generated IDs, UUIDs, draft start/end times, and text.
-
Add timing options.
- Default cue duration: 3 seconds.
- Default gap: 0.2 seconds.
- Optional max characters per cue.
- Optional start time offset.
- Keep the first version simple; alignment happens later on the waveform.
-
Add import UI.
- Add an
Import transcript option in the load subtitles / manage tracks dialog.
- Allow paste into a textarea and loading a
.txt file.
- Show a preview table with cue number, start, end, and text.
- Let the user create a new track or replace an empty active track.
-
Integrate with existing track actions.
- Use
loadSubtitlesIntoTrack or setInitialSubtitles depending on current track state.
- Name generated tracks from the file name or
Transcript.
- Preserve undo behavior consistently with other imports.
-
Tests.
- Add
tests/transcript-segmentation.test.ts.
- Cover line mode, sentence mode, max-character mode, empty input, and timing generation.
Acceptance criteria
- Users can paste text or load a
.txt file and create draft subtitles locally.
- Segmentation is previewed before import.
- Imported cues can be edited, retimed, and exported like normal SRT/VTT cues.
- No ASR, cloud call, account, or backend is introduced.
Summary
Add a browser-only import flow for pasted plain text or
.txttranscript files, then split the text into draft subtitle cues. This is a high-value way to support caption creation without adding ASR or server-side processing.Why this is in scope
Implementation plan
Add segmentation utilities.
lib/transcript-segmentation.ts.Subtitle[]with generated IDs, UUIDs, draft start/end times, and text.Add timing options.
Add import UI.
Import transcriptoption in the load subtitles / manage tracks dialog..txtfile.Integrate with existing track actions.
loadSubtitlesIntoTrackorsetInitialSubtitlesdepending on current track state.Transcript.Tests.
tests/transcript-segmentation.test.ts.Acceptance criteria
.txtfile and create draft subtitles locally.