import type { VeniceClient } from '../venice/client.js'; import type { Character, SeriesState } from '../series/types.js'; /** Venice `reference_audio_urls` per-clip bounds. */ export declare const VOICE_REF_MIN_SEC = 2; export declare const VOICE_REF_MAX_SEC = 15; /** Target length of an auto-generated voice-donor clip (well within 2-15s). */ export declare const VOICE_REF_TARGET_SEC = 10; /** Absolute + series-relative path for a character's voice-reference clip. */ export declare function voiceReferencePathsFor(series: SeriesState, characterName: string): { absPath: string; relPath: string; }; /** Resolve a stored `voiceReferencePath` (relative or absolute) to an absolute path. */ export declare function resolveVoiceReferenceAbsPath(series: SeriesState, character: Character): string | undefined; export interface GenerateVoiceReferenceOptions { /** Spoken text to render. Defaults to a neutral sample steered by voiceDescription. */ text?: string; /** Named seed-audio voice (e.g. "Tim"). Defaults to "Describe in prompt" steering. */ voice?: string; /** Playback speed 0.5-2 (default 1). */ speed?: number; /** Path to an operator-supplied clip to use verbatim instead of generating. */ file?: string; /** Override the seed-audio model id. */ model?: string; /** Target seconds for the generated clip (default VOICE_REF_TARGET_SEC). */ targetSec?: number; } /** * Build (or import) a voice-donor clip for a character, normalize it into the * 2-15s window, write it to `characters//voice-reference.mp3` (archiving * any prior version), and return the absolute + series-relative paths plus the * model used. Does NOT mutate `character` or persist `character.json` — the * caller owns that (so both the CLI command and the inline auto-gen can decide * how to persist). */ export declare function generateVoiceReference(client: VeniceClient, series: SeriesState, character: Character, options?: GenerateVoiceReferenceOptions): Promise<{ absPath: string; relPath: string; model: string; }>; export interface HarvestVoiceReferenceOptions { /** Trim: only use audio from this offset (seconds into the clip). */ startSec?: number; /** Trim: only use audio up to this offset (seconds into the clip). */ endSec?: number; } /** * Harvest a voice-donor clip from an already-rendered video shot — typically * the first clip where the character speaks. This locks every later shot to * the voice the audience actually heard, instead of a seed-audio synthesis of * `voiceDescription` that the video model's first performance may disagree * with. * * Extracts the audio track (optionally windowed by start/end), strips leading * and trailing silence, normalizes into the Venice 2-15s window, and writes * `characters//voice-reference.mp3` (archiving any prior version). * Purely local — no Venice call. Does NOT mutate `character` or persist * `character.json`; the caller owns that, same contract as * `generateVoiceReference`. */ export declare function harvestVoiceReferenceFromClip(series: SeriesState, character: Character, clipPath: string, options?: HarvestVoiceReferenceOptions): Promise<{ absPath: string; relPath: string; model: string; }>; //# sourceMappingURL=voice-reference.d.ts.map