/** * Packer: collapses word streams into phrases and renders takes_packed.md. * * The pack is the primary LLM surface for editing. Keep it compact — target * ~12KB per 40 minutes of source audio. The format matches the one used by * browser-use/video-use so experience across projects transfers directly. * * Phrase boundary heuristics, in order: * 1. Gap between consecutive words > `silenceGapSec` (default 0.45s) * 2. Hard sentence punctuation followed by any gap (. ! ?) * 3. Soft punctuation (, ; :) only when followed by > 0.30s gap */ import type { AudioEvent, Take, TakesPack, WordTiming } from './types.js'; export interface PackOptions { silenceGapSec?: number; maxPhraseSec?: number; /** * Minimum character length for a phrase to appear in the pack — shorter * fragments get merged into the next phrase. */ minPhraseChars?: number; } /** * Derive a stable 5-char hex id (e.g. `C0103`) from the file path. The * leading `C` matches video-use's naming. Stable across runs so EDLs * survive re-transcription. */ export declare function deriveTakeId(file: string, ordinal: number): string; export interface BuildTakeInput { file: string; words: WordTiming[]; durationSec: number; transcriber: string; ordinal: number; mode: 'asr' | 'aligned'; defaultSpeaker?: string; /** Pre-computed phrase-level speaker labels when diarization is available. */ phraseSpeakers?: string[]; audioEvents?: AudioEvent[]; packOptions?: PackOptions; } export declare function buildTake(input: BuildTakeInput): Take; /** * Render a TakesPack to markdown. Each take becomes a `##` heading with * bracketed phrase timestamps inside — the exact format video-use uses. */ export declare function renderTakesPack(pack: TakesPack): string; export declare function writeTakesPack(pack: TakesPack, outPath: string): void; /** Write `.words.json` next to a take for programmatic consumers. */ export declare function writeWordsJson(take: Take, outPath: string): void; export declare function wordsJsonPathFor(sourceFile: string, editDir: string): string; //# sourceMappingURL=packer.d.ts.map