/** * Demofly Whisper integration — extract word-level timestamps from TTS audio. * * Shells out to the `whisper` CLI (same subprocess pattern as ffmpeg). * Uses whisper-base model — TTS audio is clean, so a small model achieves * near-perfect accuracy while keeping runtime under 5s per scene. * * Fallback: If Whisper isn't installed, returns duration-only data and * prints a warning suggesting `pip install openai-whisper`. */ export interface WordTimestamp { word: string; startMs: number; endMs: number; } export interface PhraseTimestamp { text: string; startMs: number; endMs: number; beatId: string; } export interface SceneTimestamps { sceneId: string; audioFile: string; durationMs: number; words: WordTimestamp[]; phrases: PhraseTimestamp[]; } export interface TimestampsData { scenes: SceneTimestamps[]; } /** Check if the whisper CLI is available. */ export declare function hasWhisper(): boolean; /** * Extract timestamps from all audio files in a demo's audio/ directory. * * If Whisper is available, produces word-level and phrase-level timestamps. * If not, falls back to duration-only data (empty words/phrases arrays). * * @returns TimestampsData written to audio/timestamps.json */ export declare function extractTimestamps(projectDir: string): TimestampsData; //# sourceMappingURL=timestamps.d.ts.map