/** * Demofly TTS integration — Kokoro via sherpa-onnx-node native bindings. * * Parses narration.md, generates per-scene WAV * files using OfflineTts, outputs to /audio/.wav. */ export interface TtsOptions { voice?: string; speed?: number; lang?: string; modelDir?: string; sceneFilter?: string; } export interface TtsResult { sceneId: string; filePath: string; durationS: number; peakMemoryMb: number; elapsedS: number; } export interface TranscriptScene { sceneId: string; text: string; } /** * Parse a narration.md file into per-scene narration text. * Extracts plain text from beats, stripping directives like [warmly], [pause: 0.3s], * _(silent portion)_ notes, and markdown headers. * * Scene IDs default to "scene-N" (matching timing.json convention). * Override with explicit ID in header: ## Scene 1: Title {#my-custom-id} */ /** * Parse narration.md — extracts narration text from `` tags. * * Only text inside `...` is extracted. Everything * outside (headers, word budgets, metadata, comments) is ignored. * * Format: * ## Scene 1: Title * ### Beat 1.1 — Label [at 0ms, window: 5.2s] * **Word budget**: 8 words * Welcome to the app. It's really simple. */ export declare function parseTranscript(content: string): TranscriptScene[]; /** * Generate TTS audio for a single piece of text. */ export declare function generateAudio(text: string, outputPath: string, options?: TtsOptions, ttsInstance?: any): TtsResult; /** * Generate TTS for all scenes in a narration document. * Accepts narration.md with `` tag format. * Returns array of results and writes WAV files to /audio/. */ export declare function generateAllAudio(narrationPath: string, projectDir: string, options?: TtsOptions): TtsResult[]; //# sourceMappingURL=tts.d.ts.map