/** * Bundled sound-effect library. * * gg-editor's `add_sfx_at_cuts` needs a WAV/MP3 file per hit. Without this * module the agent had to either ask the user to supply one or invent a path * — both broke the canonical retention pipeline. Now the agent calls * `add_sfx_at_cuts(sfx="whoosh", …)` with a bundled name and the resolver * either returns a cached WAV or synthesises one via ffmpeg into * `~/.gg/sfx-cache/.wav` (~50 ms one-time per name; cached forever). * * Why synthesised, not shipped: no third-party files = no IP risk + no npm * weight. Every recipe is a pure ffmpeg-lavfi expression so the output is * deterministic and reproducible. Quality is "creator-vlog acceptable" — * not Skywalker Sound, but indistinguishable from typical CapCut presets in * a sub-1-second cut. * * Design rules for recipes: * - Stereo (`-ac 2`) — every consumer mixes into stereo audio. * - 200–500 ms long. Anything longer fights the next cut. * - Peak ≤ -3 dBFS (the recipes all keep amplitude ≤ 0.7) so * `add_sfx_at_cuts`'s default -8 dB gain leaves headroom for voice. * - Linear fade in (≥5 ms) + fade out — no clicks at the envelope edges. */ export interface SfxRecipe { /** One-line creator description shown in the system prompt + tool description. */ description: string; /** * ffmpeg args producing the WAV. The cached output path is appended at * synthesis time; recipes should NOT include it themselves. */ args: string[]; } /** * The bundled set. Keep this list short and creator-relevant — * 8–10 names covers the entire short-form vocabulary. */ export declare const BUNDLED_SFX: Record; /** Names of every bundled SFX (sorted for stable display). */ export declare function listBundledSfxNames(): string[]; /** A short markdown-style list of bundled SFX for tool descriptions / system prompts. */ export declare function bundledSfxDescriptionList(): string; /** Cache dir for synthesised WAVs. Stable across sessions, gitignored by convention. */ export declare function getSfxCacheDir(): string; /** * Resolve an SFX argument: * * - Bundled name (e.g. `"whoosh"`) → cache hit at `~/.gg/sfx-cache/whoosh.wav`, * synthesising via ffmpeg on first request. * - File-like string (contains `/`, `\`, `.`, `~`) → resolve against `cwd` * and return as-is. The caller still has to verify the file exists. * * Throws when the name is neither bundled nor file-like. */ export declare function resolveSfx(nameOrPath: string, cwd: string, signal?: AbortSignal): Promise<{ path: string; bundled: boolean; name?: string; }>; /** * Ensure a bundled SFX is present on disk, synthesising it via ffmpeg if not. * Returns the absolute cache path. */ export declare function ensureBundledSfx(name: string, signal?: AbortSignal): Promise; //# sourceMappingURL=bundled-sfx.d.ts.map