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>
This commit is contained in:
2025-10-27 13:02:39 +07:00
parent 52b8348a03
commit 30ac7e89e9
4 changed files with 190 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ dependencies = [
"pyaudio>=0.2.13",
"RPi.GPIO>=0.7.1",
"waitress>=2.1.0",
"scipy>=1.7.0",
]
[project.scripts]