ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers Python 3.12.3 audio duration (ffprobe): 159.480000 s [test] ffprobe -v error -show_entries format=duration -of csv=p=0 work/episode.mp3 159.480000 exit=0 [edge: missing file] ffprobe -v error -show_entries format=duration -of csv=p=0 work/nope.mp3 work/nope.mp3: No such file or directory exit=1 [test] ffmpeg -v error -i out/episode-accurate.vtt -f srt - 1 00:00:00,000 --> 00:00:02,200 He was in a favored state of mind, owing to 2 exit=0 [edge: comma instead of dot in times (not valid WebVTT)] ffmpeg -v error -i edge/comma-in-vtt.vtt -f srt - exit=0 [edge: empty file] ffmpeg -v error -i edge/empty.vtt -f srt - exit=0 [edge: missing WEBVTT header] ffmpeg -v error -i edge/no-header.vtt -f srt - 1 00:00:00,000 --> 00:00:02,200 He was in a favored state of mind, owing to 2 exit=0 [test] ffmpeg -v error -y -i out/episode-accurate.srt edge/converted.vtt exit=0 [edge: SRT with Windows line breaks] ffmpeg -v error -y -i edge/crlf.srt edge/converted-crlf.vtt exit=0 [edge: missing input] ffmpeg -v error -y -i edge/none.srt edge/x.vtt [in#0 @ 0x605d89121d80] Error opening input: No such file or directory Error opening input file edge/none.srt. Error opening input files: No such file or directory exit=254 [test] python3 check-transcript.py out/episode-accurate.vtt 159.48 OK: 61 cues, last one ends at 159.1 s exit=0 [edge: SRT from the tool] python3 check-transcript.py out/episode-accurate.srt 159.48 OK: 61 cues, last one ends at 159.1 s exit=0 [edge: Fast model file] python3 check-transcript.py out/episode-fast.vtt 159.48 OK: 58 cues, last one ends at 159.1 s exit=0 [edge: missing file] python3 check-transcript.py edge/none.vtt 159.48 cannot open edge/none.vtt: No such file or directory exit=2 [edge: empty file] python3 check-transcript.py edge/empty.vtt 159.48 edge/empty.vtt is empty exit=2 [edge: Windows line breaks] python3 check-transcript.py edge/crlf.srt 159.48 OK: 61 cues, last one ends at 159.1 s exit=0 [edge: non-ASCII text] python3 check-transcript.py edge/nonascii.vtt 159.48 OK: 61 cues, last one ends at 159.1 s exit=0 [edge: comma in a VTT time] python3 check-transcript.py edge/comma-in-vtt.vtt 159.48 PROBLEM line 3: time line not in the WebVTT format: '00:00:00,000 --> 00:00:02.200' PROBLEM line 7: time line not in the WebVTT format: '00:00:02,200 --> 00:00:04.340' PROBLEM line 10: time line not in the WebVTT format: '00:00:04,340 --> 00:00:06.980' PROBLEM line 13: time line not in the WebVTT format: '00:00:06,980 --> 00:00:08.950' PROBLEM line 17: time line not in the WebVTT format: '00:00:08,950 --> 00:00:10.880' PROBLEM line 20: time line not in the WebVTT format: '00:00:10,880 --> 00:00:11.980' exit=1 [edge: no WEBVTT header] python3 check-transcript.py edge/no-header.vtt 159.48 PROBLEM: a .vtt file must start with the line WEBVTT PROBLEM line 1: time line not in the SRT format: '00:00:00.000 --> 00:00:02.200' PROBLEM line 5: time line not in the SRT format: '00:00:02.200 --> 00:00:04.340' PROBLEM line 8: time line not in the SRT format: '00:00:04.340 --> 00:00:06.980' PROBLEM line 11: time line not in the SRT format: '00:00:06.980 --> 00:00:08.950' PROBLEM line 15: time line not in the SRT format: '00:00:08.950 --> 00:00:10.880' exit=1 [edge: cues out of order] python3 check-transcript.py edge/out-of-order.vtt 159.48 PROBLEM cue 3: starts at 2.200 s, before the previous cue started (4.340 s): cues are out of order PROBLEMS: 1: 61 cues, last one ends at 159.1 s exit=1 [edge: audio shorter than transcript (60 s)] python3 check-transcript.py out/episode-accurate.vtt 60 PROBLEM: last cue ends at 159.1 s, audio is 60.0 s long PROBLEMS: 1: 61 cues, last one ends at 159.1 s exit=1 [edge: overlapping cues (a warning, exit stays 0)] python3 check-transcript.py edge/overlap.vtt 159.48 WARNING cue 3: starts at 4.000 s before the previous cue ended (4.340 s): overlapping cues OK (1 warning(s)): 61 cues, last one ends at 159.1 s exit=0 [edge: a cue that ends before it starts] python3 check-transcript.py edge/end-before-start.vtt 159.48 PROBLEM cue 3 (line 11): ends at 4.000 s, not after its start 4.340 s PROBLEMS: 1: 61 cues, last one ends at 159.1 s exit=1 [edge: a cue with no text] python3 check-transcript.py edge/empty-cue.vtt 159.48 PROBLEM cue 3: no text PROBLEMS: 1: 61 cues, last one ends at 159.1 s exit=1 [edge: audio 0.9 s shorter than the last cue (inside the 1 s allowance)] python3 check-transcript.py out/episode-accurate.vtt 158.2 OK: 61 cues, last one ends at 159.1 s exit=0 [edge: audio 1.1 s shorter than the last cue] python3 check-transcript.py out/episode-accurate.vtt 158 PROBLEM: last cue ends at 159.1 s, audio is 158.0 s long PROBLEMS: 1: 61 cues, last one ends at 159.1 s exit=1 [edge: audio length is nan] python3 check-transcript.py out/episode-accurate.vtt nan audio-seconds must be a number above 0 exit=2 [edge: audio length is not a number] python3 check-transcript.py out/episode-accurate.vtt abc audio-seconds must be a number above 0 exit=2 [edge: no arguments] python3 check-transcript.py usage: check-transcript.py transcript.(srt|vtt) [audio-seconds] exit=2 [test] python3 clean-transcript.py out/episode-accurate.vtt fixes.tsv edge/episode-clean.vtt Hurst would: 1 replaced Herst would: 1 replaced Kerry: 1 replaced drew: 2 replaced exit=0 [edge: a backslash in the replacement] python3 clean-transcript.py out/episode-accurate.vtt edge/fixes-backslash.tsv edge/o-bs.vtt Kerry: 1 replaced exit=0 [edge: output folder does not exist] python3 clean-transcript.py out/episode-accurate.vtt fixes.tsv edge/nodir/o.vtt cannot write edge/nodir/o.vtt: No such file or directory exit=2 [edge: check the cleaned file] python3 check-transcript.py edge/episode-clean.vtt 159.48 OK: 61 cues, last one ends at 159.1 s exit=0 [edge: missing input] python3 clean-transcript.py edge/none.vtt fixes.tsv edge/o.vtt cannot open edge/none.vtt: No such file or directory exit=2 [edge: empty input] python3 clean-transcript.py edge/empty.vtt fixes.tsv edge/o.vtt edge/empty.vtt is empty exit=2 [edge: empty fixes file] python3 clean-transcript.py out/episode-accurate.vtt edge/fixes-empty.tsv edge/o.vtt fixes.tsv has no wrongright lines exit=2 [edge: Windows line breaks] python3 clean-transcript.py edge/crlf.srt fixes.tsv edge/o-crlf.srt Hurst would: 1 replaced Herst would: 1 replaced Kerry: 1 replaced drew: 2 replaced exit=0 [edge: non-ASCII replacement] python3 clean-transcript.py out/episode-accurate.vtt edge/fixes-nonascii.tsv edge/o-na.vtt Kerry: 1 replaced exit=0 [edge: check non-ASCII result] python3 check-transcript.py edge/o-na.vtt 159.48 OK: 61 cues, last one ends at 159.1 s exit=0 time lines identical after cleaning: yes [test] python3 -I check-xml.py feed-item.xml transcript tags found: 3 text/vtt https://example.com/episode1.vtt application/x-subrip https://example.com/episode1.srt text/plain https://example.com/episode1.txt exit=0 [edge: tags not closed (not well-formed)] python3 -I check-xml.py edge/broken-feed.xml not well-formed: mismatched tag: line 12, column 6 exit=1 [edge: namespace declaration missing] python3 -I check-xml.py edge/no-namespace.xml not well-formed: unbound prefix: line 9, column 6 exit=1 [edge: no arguments] python3 -I check-xml.py usage: check-xml.py feed-or-item.xml exit=2 [edge: missing file] python3 -I check-xml.py edge/nope.xml cannot open edge/nope.xml: No such file or directory exit=2 [edge: a tag with no type] python3 -I check-xml.py edge/no-type.xml transcript tags found: 3 None https://example.com/episode1.vtt PROBLEM: a transcript tag has no type (required) application/x-subrip https://example.com/episode1.srt text/plain https://example.com/episode1.txt exit=1 [edge: http instead of https in the namespace] python3 -I check-xml.py edge/http-namespace.xml transcript tags found: 0 hint: the tag must be inside an , not in , and the namespace must be exactly https://podcastindex.org/namespace/1.0 (https, not http) exit=1 [edge: tag inside channel, not item] python3 -I check-xml.py edge/tag-in-channel.xml transcript tags found: 0 hint: the tag must be inside an , not in , and the namespace must be exactly https://podcastindex.org/namespace/1.0 (https, not http) exit=1 selftest OK: identical=0, empty=10 of 10, one substitution=1 of 10 == WER accurate reference words 537, hypothesis words 539, errors 26, WER 4.8% == WER fast reference words 537, hypothesis words 540, errors 33, WER 6.1% == WER accurate-edited reference words 537, hypothesis words 538, errors 21, WER 3.9% == counts accurate.txt bytes 3437 accurate.srt bytes 4926 accurate.vtt bytes 4760 accurate cues srt 61 vtt 61 fast.txt bytes 3412 fast.srt bytes 4823 fast.vtt bytes 4666 fast cues srt 58 vtt 58 == error entries on names, Accurate run (7 of 26): ins hurst, ins would, sub hurstwood>walk, sub drouet>drew, sub carrie>kerry, ins herst, sub hurstwood>would == the other 19 are not names: 19 entries counting 'ins drew' beside 'sub drearily>early' (a different word from the name Drouet) == in the Accurate list only (removed by the 5 edits): ins drew ins herst ins hurst sub carrie kerry sub drouet drew sub hurstwood walk sub hurstwood would == in the edited list only (new after the edits): ins drouet ins walk == lines of the Accurate .txt that contain 'drew' (one is the name, one is the tool's guess at 'drearily'; reference line 11 DROUET, line 15 DREARILY): 35:[00:00:52] So little did he consider drew that it never once occurred to him to worry about his finding out 45:[00:01:10] After a time he gave up waiting and drew early headed for the Madison car. == cue boundaries that differ between the Accurate and the edited .vtt (cue number: ms): [(8, 20), (9, 20), (23, -60), (24, -60)] == tool runs (node tool-run.cjs, headless Chromium on the VPS, timestamps ticked in all three runs) [Accurate] readout: 2:39 of audio · 539 words · done in 98 s wall-clock seconds including model download: 109.6 [Fast] readout: 2:39 of audio · 540 words · done in 52 s wall-clock seconds including model download: 61.3 [Accurate then 5 segment boxes edited (FIX=Hurst would=>Hurstwood;Herst would=>Hurstwood would;Kerry=>Carrie;drew=>Drouet)] readout: 2:39 of audio · 539 words · done in 115 s wall-clock seconds including model download: 128.8 segments edited: 5 of 48 downloads of these three runs are byte-identical to the published episode-accurate / episode-fast / episode-accurate-edited .txt and .vtt (cmp) == Koldflux in-browser check, /tools/captions/vtt with Apple Podcasts chosen (node vtt-tool.cjs) (lines "Cue N exceeds 21 chars/sec (readability)" are left out below; the good file has 11 of them, counted in its 12 findings; the tool does not read the audio length) === out/episode-accurate.vtt Loaded: episode-accurate.vtt 61 cues · last cue ends at 00:02:39,050 · avg 17.61 chars/sec 12 finding(s) for Apple Podcasts: No verified caption rule for Apple Podcasts; behavior is advisory only. === edge/comma-in-vtt.vtt Loaded: comma-in-vtt.vtt 2 finding(s) for Apple Podcasts: No valid cues parsed. No verified caption rule for Apple Podcasts; behavior is advisory only. === edge/no-header.vtt Loaded: no-header.vtt 2 finding(s) for Apple Podcasts: Could not detect SRT or VTT format. No verified caption rule for Apple Podcasts; behavior is advisory only. === edge/out-of-order.vtt Loaded: out-of-order.vtt 61 cues · last cue ends at 00:02:39,050 · avg 17.61 chars/sec 13 finding(s) for Apple Podcasts: Cue 3 overlaps previous cue. No verified caption rule for Apple Podcasts; behavior is advisory only. === edge/overlap.vtt Loaded: overlap.vtt 61 cues · last cue ends at 00:02:39,050 · avg 17.61 chars/sec 13 finding(s) for Apple Podcasts: Cue 3 overlaps previous cue. No verified caption rule for Apple Podcasts; behavior is advisory only. === edge/end-before-start.vtt Loaded: end-before-start.vtt 61 cues · last cue ends at 00:02:39,050 · avg 17.61 chars/sec 13 finding(s) for Apple Podcasts: Cue 3 has zero or negative duration. No verified caption rule for Apple Podcasts; behavior is advisory only. === edge/empty-cue.vtt Loaded: empty-cue.vtt 61 cues · last cue ends at 00:02:39,050 · avg 17.43 chars/sec 12 finding(s) for Apple Podcasts: No verified caption rule for Apple Podcasts; behavior is advisory only. === edge/empty.vtt Loaded: empty.vtt