- 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>
40 lines
1.1 KiB
Makefile
40 lines
1.1 KiB
Makefile
# Wedding Phone Makefile
|
|
# Simple commands to run the wedding phone system
|
|
|
|
.PHONY: start test install clean help sync
|
|
|
|
start:
|
|
@echo "Starting Wedding Phone System..."
|
|
uv run --no-project python rotary_phone_web.py
|
|
|
|
test:
|
|
@echo "Running audio tests..."
|
|
uv run --no-project python test_complete.py
|
|
|
|
sync:
|
|
@echo "Installing/syncing dependencies..."
|
|
uv pip install flask numpy pyaudio RPi.GPIO waitress scipy
|
|
|
|
install: sync
|
|
@echo "Dependencies installed!"
|
|
|
|
clean:
|
|
@echo "Cleaning up..."
|
|
rm -rf __pycache__ .pytest_cache templates/
|
|
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
help:
|
|
@echo "Wedding Phone - Available Commands:"
|
|
@echo ""
|
|
@echo " make start - Start the wedding phone system"
|
|
@echo " make test - Run audio tests"
|
|
@echo " make sync - Install/sync dependencies"
|
|
@echo " make install - Same as sync"
|
|
@echo " make clean - Clean temporary files"
|
|
@echo " make help - Show this help message"
|
|
@echo ""
|
|
@echo "Or use UV directly:"
|
|
@echo " uv run --no-project python rotary_phone_web.py"
|
|
@echo " uv run --no-project python test_complete.py"
|