Changed from os.rename() to shutil.copy2() when creating backups.
This prevents the "No such file or directory" error that occurred
when trying to write the resampled file after the original was renamed.
Now the script:
- Copies original to .backup (instead of renaming)
- Reads from .backup file
- Writes resampled audio to original filename
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created resample_audio.py utility script
- Automatically reads target sample rate from config.json
- Resamples all WAV files in sounds directory
- Creates .backup files before modifying originals
- Handles both mono and stereo audio
- Uses scipy.signal.resample for high-quality resampling
- Added scipy>=1.7.0 dependency to pyproject.toml
- Updated Makefile sync command to include scipy
- Updated README.md with sample rate troubleshooting section
- Updated config example in README to show 48kHz default
- Added beep_sound configuration to README system section
This resolves sample rate mismatch errors when audio files
don't match the configured rate in config.json.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>