Files
VoiceStudio/backend
kevin9327andClaude Opus 5 151d58f024 fix(dub): a pasted WebVTT file maps its cues, not its markup
Dub -> Paste translation -> Load file accepts .vtt and sends timestamped
text to the lenient SRT parser, which is meant to take VTT too. Two
ordinary WebVTT files broke it:

- Cues without an hours field (00:01.000 --> 00:04.500) matched neither
  the frontend's timing detector nor the backend pattern, so the dialog
  mapped WEBVTT, the timing lines and the dialogue as plain translations,
  and the endpoint itself answered "No timed cues found".
- A cue identifier or NOTE block after a cue became part of that cue's
  text, because only digit-only index lines were trimmed.

The hours are now optional in both patterns, as dub_pipeline's yt-dlp
caption parser already allows. For WebVTT input a cue's text ends at its
first blank line, as the format specifies; SRT keeps its lenient
blank-line handling.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 08:48:05 +09:00
..