import { type DecodedPcmAudio } from './wav.js'; export type AudioFormat = 'wav' | 'webm' | 'ogg' | 'mp3' | 'mp4' | 'unknown'; export declare class AudioNormalizationError extends Error { readonly code = "unsupported_audio_codec"; constructor(message: string, options?: ErrorOptions); } export interface AudioDecoderStatus { available: boolean; command: string; error?: string; } /** Fast local energy check to skip pure silence/floor-noise chunks before calling STT. */ export declare function isMostlySilentPcm(samples: Float32Array, rmsThreshold?: number, peakThreshold?: number): boolean; /** * Fast metadata-only duration probe (WAV header or ffprobe) to avoid full-file FFmpeg * decoding just to verify duration. Returns undefined when container lacks duration metadata. */ export declare function probeAudioDurationMs(filePath: string, signal?: AbortSignal): Promise; /** Extract a specific [startMs, endMs] window directly to a 16kHz mono PCM16 WAV buffer. */ export declare function extractAudioWindowToWav(input: { filePath: string; startMs: number; endMs: number; signal?: AbortSignal; }): Promise; /** Reports whether compressed browser/mobile recordings can be decoded on this host. */ export declare function getAudioDecoderStatus(signal?: AbortSignal): Promise; export declare function detectAudioFormat(buffer: Buffer): AudioFormat; export declare function decodeAudioToMonoFloat32(input: { buffer: Buffer; signal?: AbortSignal; }): Promise; /** Decodes a recording into bounded PCM WAV files and removes all temporary files afterwards. */ export declare function forEachNormalizedAudioSegment(input: { filePath: string; segmentSeconds?: number; mergeShortTailSeconds?: number; maxDurationSeconds?: number; signal?: AbortSignal; }, consume: (buffer: Buffer, index: number) => Promise): Promise;