Commit 02b7430
authored
Fix timestamps and strip extraneous whitespace in WebVTT output (openai#219)
* Use two-digit hours in WebVTT timestamps
Per the WebVTT specification [0]:
> A WebVTT timestamp consists of the following components, in the given
> order:
>
> 1. Optionally (required if hours is non-zero):
> 1. Two or more ASCII digits, representing the hours as a base ten
> integer.
> 2. A U+003A COLON character (:)
YouTube won’t accept timestamps containing single-digit hours.
[0] https://www.w3.org/TR/webvtt1/#webvtt-timestamp
* Strip segment text in WebVTT output
We already do this for plain text and SubRip output, so we should do it
for WebVTT too.1 parent 0b1ba3d commit 02b7430
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments