/** * Per-character dialogue audio orchestrator. * * `generateDialogueAudio` synthesizes one TTS clip per `DialogueTurn` — each * turn maps to a named character (optional per-turn voice override) — and * persists a `dialogue.json` artifact listing every clip with its project- * relative path and durationMs. * * Files are written to: * projects//artifacts/audio/dialogue--.wav * * The orchestrator is pure-ish: `env` and `fetcher` are threaded through to the * TTS backend so tests run fully offline with no real keys or network. Throws * `tts_failed` when no requested/available TTS backend can run. */ export declare const DIALOGUE_SCHEMA_VERSION = 1; /** A single spoken line attributed to a named character. */ export interface DialogueTurn { /** Character name (used in artifact and output filename). */ name: string; /** Optional per-turn voice id forwarded to the TTS backend. */ voice?: string; /** The spoken line to synthesize. */ line: string; } export interface DialogueClip { name: string; voice?: string; line: string; /** Project-relative path to the generated audio clip. */ path: string; durationMs: number; } export interface DialogueArtifact { schemaVersion: typeof DIALOGUE_SCHEMA_VERSION; projectSlug: string; generatedAt: string; backendId: string; turns: DialogueClip[]; } export interface GenerateDialogueAudioOptions { workspaceRoot: string; slug: string; turns: DialogueTurn[]; /** Restrict to this backend id (defaults to the first AVAILABLE backend). */ backendId?: string; dryRun?: boolean; env?: NodeJS.ProcessEnv; fetcher?: typeof fetch; } export interface GenerateDialogueAudioResult { clips: { name: string; voice?: string; path: string; durationMs: number; }[]; artifactPath: string; } /** Path of the persisted dialogue.json artifact for a project. */ export declare function dialogueArtifactPathFor(root: string, slug: string): string; /** Directory where per-turn audio clips are written. */ export declare function dialogueAudioDirFor(root: string, slug: string): string; /** * Synthesize one audio clip per turn and persist dialogue.json. * * Returns the in-memory clip list and the absolute path of the written * artifact so callers can chain into the assemble layer. * * Throws `tts_failed` when: * - no turns are provided * - a requested backend is not available * - no TTS backend is available at all * - a turn has an empty line */ export declare function generateDialogueAudio(options: GenerateDialogueAudioOptions): Promise; //# sourceMappingURL=dialogue.d.ts.map