/** * Audio Processor - v1.0.0 * Audio transcription/synthesis wrappers with format detection, duration, split. */ export type AudioFormat = 'wav' | 'mp3' | 'ogg' | 'flac' | 'webm' | 'aac' | 'unknown'; export interface TranscribeOptions { language?: string; model?: string; provider?: string; } export interface SynthesizeOptions { voice?: string; speed?: number; format?: AudioFormat; provider?: string; } export interface TranscribeResult { text: string; language?: string; duration?: number; segments?: { start: number; end: number; text: string; }[]; } export interface SynthesizeResult { audio: Buffer; format: AudioFormat; duration?: number; } export type TranscribeFunction = (audio: Buffer, options?: TranscribeOptions) => Promise; export type SynthesizeFunction = (text: string, options?: SynthesizeOptions) => Promise; export declare class AudioProcessor { private transcribeFn?; private synthesizeFn?; constructor(options?: { transcribe?: TranscribeFunction; synthesize?: SynthesizeFunction; }); /** Detect audio format from buffer header */ static detectFormat(audio: Buffer): AudioFormat; /** Estimate duration in seconds for WAV files (for others returns undefined) */ static estimateDuration(audio: Buffer): number | undefined; /** Split audio buffer into chunks of roughly `chunkBytes` size */ static split(audio: Buffer, chunkBytes: number): Buffer[]; transcribe(audio: Buffer, options?: TranscribeOptions): Promise; synthesize(text: string, options?: SynthesizeOptions): Promise; } //# sourceMappingURL=audio.d.ts.map