/** * Audio playback utilities for CLI * * Provides functionality for playing TTS audio using platform-specific * CLI tools with proper cleanup and error handling. * * @module cli/utils/audioPlayer */ import type { AudioFormat } from "../../lib/types/index.js"; /** * Get the file extension for an audio format * * @param format - Audio format * @returns File extension string (e.g., "mp3", "wav") */ export declare function getAudioExtension(format: AudioFormat): string; /** * Play audio from a buffer using platform-specific CLI tools * * Writes the buffer to a temporary file, plays it using the appropriate * system audio player, and cleans up the temp file afterward. * * Supported platforms: * - macOS: uses `afplay` (built-in, supports mp3/wav/aac/flac) * - Linux: uses `paplay` for non-wav, `aplay` for wav * - Windows: uses PowerShell SoundPlayer (wav) or WMPlayer.OCX (mp3) * * @param buffer - Audio data buffer * @param format - Audio format (mp3, wav, ogg, opus) * @throws Error if playback fails or platform is unsupported * * @example * ```typescript * await playAudio(audioBuffer, "mp3"); * ``` */ export declare function playAudio(buffer: Buffer, format: AudioFormat): Promise;