import type { Draft } from "./draft.js"; export interface CaptionOptions { audio?: string; fromSegment?: string; whisperCmd?: string; whisperModel?: string; language?: string; trackName?: string; styleRef?: string; } export interface CaptionResult { ok: boolean; cues: number; language?: string; track_name: string; first_cue?: { start_us: number; text: string; }; last_cue?: { start_us: number; text: string; }; source_audio: string; engine: "whisper-cli" | "shell" | "openai" | "stdin-srt"; } /** * Generate captions by running whisper on the project's audio and emitting * real CapCut caption-track segments (not text-segment mimics — fixes the * import-srt pain documented in pyJianYingDraft #148). * * Whisper integration is shell-out; user supplies the binary path. We support * the canonical whisper.cpp output naming convention (`.srt`). * * Architecture: * 1. Resolve audio file (either --audio or extracted from --from-segment) * 2. Spawn whisper CLI; capture SRT output * 3. Parse SRT into caption cues * 4. Create captions track + real subtitle material per cue */ export declare function captionDraft(draft: Draft, opts: CaptionOptions): CaptionResult;