/** * Create WAV header for 16-bit PCM audio */ export declare function createWavHeader(dataLength: number, sampleRate: number): Buffer; /** * Convert Int16Array to Buffer */ export declare function int16ArrayToBuffer(samples: number[]): Buffer; /** * Create and save WAV file */ export declare function createWav(audioBuffer: number[], sampleRate: number, filename: string): void; /** * Play a WAV buffer by streaming it into ffplay over stdin. * * ffplay ships with ffmpeg and is cross-platform (macOS/Linux/Windows), so * we avoid the old "write to /tmp then shell out to afplay/aplay/powershell" * dance — no temp files, no platform switch, no hardcoded /tmp path (which * doesn't exist on Windows). Requires ffplay on PATH. */ /** * Play one mono s16le PCM chunk (as a minimal WAV) and wait for the player to finish. * Chunks are played sequentially when awaited in order — suitable for streaming TTS output. */ export declare function playPcmInt16Chunk(samples: number[], sampleRate: number): Promise; export declare function playAudio(audioBuffer: Buffer): void; //# sourceMappingURL=utils.d.ts.map