import type { Host } from "../host/host.js"; export declare const TRANSCODE_FORMATS: readonly ["wav", "mp3", "m4a", "pcm"]; export type TranscodeFormat = (typeof TRANSCODE_FORMATS)[number]; /** Plenty for speech, and a fraction of the WAV size. */ export declare const BITRATE = "96k"; export declare const FFMPEG_TIMEOUT_MS: number; export declare class FfmpegError extends Error { constructor(message: string); } /** Throws when ffmpeg is not on PATH. Called before any interrupt, so * nobody approves a file that cannot be written. */ export declare function assertFfmpegAvailable(): void; /** Arguments that read a WAV stream from stdin, change its speed when * `speed` is not 1, and write `outputFile`. The output path is one this * module chose, never the caller's. */ export declare function buildTranscodeArgs(format: TranscodeFormat, speed: number, outputFile: string): string[]; /** The bytes of `wav` at `speed`, encoded as `format`. ffmpeg writes a temp * file, because the m4a container needs a seekable output. The file is * read back through the host's files, which refuse a symlink, and it is * removed whether or not encoding succeeds. */ export declare function transcode(host: Host, wav: Uint8Array, format: TranscodeFormat, speed: number, signal: AbortSignal): Promise;