/** * LipSyncEngine.ts * * Audio-driven viseme engine for character lip sync. * Maps audio phonemes → 15 visemes → FACS AU weights per frame. * Supports emotion overlay blending (30/70 emotion/viseme). * * @see W.243: 15 visemes cover all English phonemes * @see Characters as Code vision, Stage 7 * @module character */ export type AudioAnalysisMethod = 'rhubarb' | 'oculus_lipsync' | 'manual'; export interface LipSyncConfig { /** Audio analysis method */ method: AudioAnalysisMethod; /** Blend speed between visemes (seconds). Default 0.08 */ blendSpeed: number; /** Enable emotion overlay on top of visemes */ emotionOverlay: boolean; /** Emotion blend ratio (0-1). 0.3 = 30% emotion, 70% viseme. Default 0.3 */ emotionBlend: number; /** Smoothing factor for viseme transitions (0-1). Default 0.4 */ smoothing: number; } export declare const DEFAULT_LIP_SYNC_CONFIG: LipSyncConfig; export interface VisemeKeyframe { /** Time in seconds from start of audio */ time: number; /** Viseme name (one of the 15 standard visemes) */ viseme: string; /** Optional weight override (default 1.0) */ weight?: number; } export interface LipSyncTrack { /** Total duration of the audio in seconds */ duration: number; /** Ordered viseme keyframes */ keyframes: VisemeKeyframe[]; } /** * Evaluates lip sync AU weights for a given time position. * * Handles: * - Viseme interpolation between keyframes * - Emotion overlay blending * - Smoothing to prevent jarring transitions */ export declare class LipSyncEngine { private config; private currentWeights; private targetWeights; private visemeMap; constructor(config?: Partial); /** * Get the interpolated AU weights for a given time position in a lip sync track. * * @param track - The lip sync track with viseme keyframes * @param time - Current time position in seconds * @param emotion - Optional emotion name for overlay (e.g., 'happy', 'sad') * @param emotionIntensity - Emotion intensity 0-1 * @returns Map of FACS AU id → weight */ evaluate(track: LipSyncTrack, time: number, emotion?: string, emotionIntensity?: number): Map; /** * Reset the engine state. Call when switching audio tracks. */ reset(): void; /** * Get the current configuration. */ getConfig(): Readonly; private findBracketingKeyframes; } //# sourceMappingURL=LipSyncEngine.d.ts.map