Commit Graph

2 Commits

Author SHA1 Message Date
73ca1e6935 Fix file path bug in resample_audio.py
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>
2025-10-27 13:09:09 +07:00
30ac7e89e9 Add audio resampling utility and scipy dependency
- 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>
2025-10-27 13:02:39 +07:00