Changes: - Update default sample rate from 44.1kHz to 48kHz (more professional standard) - Add sample rate validation in play_sound_file() - Display clear warning when uploaded file doesn't match configured rate - Update default sound generation (dial tone & beep) to use configured RATE - Prevent playback of incompatible sample rates (avoids ALSA errors) Error Handling: - Check file sample rate before attempting playback - Print warning with actual vs expected sample rate - Return False and skip playback if mismatch detected - User-friendly error message with resampling instructions This fixes the "Invalid sample rate" error when playing files with non-matching sample rates. Users must now resample their audio files to match the configured rate (default 48kHz). To resample audio files: ffmpeg -i input.wav -ar 48000 output.wav 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
892 B
892 B