Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/videoExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface VideoRenderRequest {

const MIN_WORD_DURATION_MS = 90;
const TYPICAL_WORD_DURATION_MS = 240;
const MODEL_RECOGNITION_DELAY_MS = 1_500;
const MODEL_RECOGNITION_DELAY_MS = 1_000;
export const FINAL_CAPTION_HOLD_MS = 1_500;
const MAX_LINE_WORDS = 8;
const MAX_LINE_CHARACTERS = 48;
Expand Down
4 changes: 2 additions & 2 deletions tests/videoExport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ describe("video subtitle export", () => {
expect(completed[3].endMs).toBeGreaterThan(completed[3].startMs);
});

it("compensates for the streaming model's transcript delay", () => {
it("compensates for the streaming model's one-second transcript delay", () => {
const tokens = tokenizeScript("Make");
const timed = appendTimedScriptWords([], tokens, 0, 1, 2_500);

expect(timed).toEqual([{ text: "Make", startMs: 760, endMs: 1_000 }]);
expect(timed).toEqual([{ text: "Make", startMs: 1_260, endMs: 1_500 }]);
});

it("groups a sentence into one lower-third line and finds its active word", () => {
Expand Down