export interface TranscodeResult { /** Absolute path to the resulting 16 kHz mono mp3. */ path: string; /** Duration of the source audio in seconds, parsed from ffmpeg stderr. */ durationSeconds: number; /** Best-effort cleanup. Safe to call multiple times. */ cleanup: () => Promise; } /** * Optional, in-pass audio cleanup applied during the transcode. All fields are * opt-in — omit them (or pass `{}`) and the transcode behaves exactly as before * (plain resample, no filtering). Callers that transcribe speech can enable a * high-pass and/or silence trim without a second ffmpeg pass. */ export interface TranscodeOptions { /** * High-pass cutoff in Hz: removes sub-speech rumble, handling noise and * plosive energy below this frequency. Typical speech value ≈ 80–100. * Omit or set ≤ 0 to disable. */ highpassHz?: number; /** Trim leading and trailing silence from the clip. */ trimSilence?: boolean; /** Silence floor (dBFS) used when `trimSilence` is set. Default -50. */ silenceThresholdDb?: number; /** * Output container/codec: "mp3" (default, libmp3lame 64k — for chat * `input_audio` and OpenAI-style endpoints) or "wav" (PCM s16le — the most * universally-accepted STT format; some OpenRouter STT providers reject mp3). */ outputFormat?: "mp3" | "wav"; } /** * Transcode the source audio file to a normalised 16 kHz mono mp3 in a * unique temp path. Always re-encodes — never trusts the source container * framing (the narr8 recorder writes OGG via a hand-rolled encoder, and * STT endpoints can be brittle about non-standard containers). * * `options` enables optional in-pass cleanup (high-pass, silence trim). When * omitted the behaviour is unchanged. */ export declare function transcodeForDirect(srcPath: string, options?: TranscodeOptions): Promise; //# sourceMappingURL=ffmpeg-transcode.d.ts.map