- 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>
- Replace Flask development server with Waitress production WSGI server
- Add waitress>=2.1.0 dependency to pyproject.toml and Makefile
- Configure 4-thread server for better performance and stability
- Create comprehensive CLAUDE.md guide for future development
- Document architecture, deployment, testing, and common patterns
- Update README.md with production-ready feature and dependencies
Eliminates Flask development server warning and provides production-grade
web serving suitable for Raspberry Pi deployment.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
**Issues Fixed:**
- Removed hatchling build-backend (not needed for scripts)
- Changed to --no-project mode (no editable install)
- UV now runs scripts directly without building
**Makefile Updated:**
- Uses 'uv run --no-project' to skip build
- Added 'make sync' to install dependencies
- Simplified dependency installation
- No more build errors
**Install Script Updated:**
- Uses 'make sync' instead of 'uv pip install -e .'
- Faster installation, no build step
**Usage:**
```bash
# Install dependencies
make sync
# Run the system (no build needed)
make start
# Everything just works!
```
**Why This Works:**
- No build system = no build errors
- Direct script execution via UV
- Dependencies installed separately
- Simpler, more reliable
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
**Issues Fixed:**
- Removed [tool.uv.scripts] (not supported by UV)
- Updated requires-python from >=3.7 to >=3.8 (Flask requirement)
- Removed tool.uv.dev-dependencies (deprecated)
**Makefile Added:**
- make start - Run the wedding phone system
- make test - Run audio tests
- make install - Install dependencies
- make clean - Clean temporary files
- make help - Show available commands
**Service Updated:**
- Changed ExecStart from 'uv run start' to 'make start'
- Uses Makefile for proper UV execution
**Documentation Updated:**
- Primary method now uses Make commands
- Added UV direct commands as alternative
- Updated file structure to include Makefile
**Usage:**
```bash
# Recommended
make start
# Alternative
uv run python rotary_phone_web.py
# Service uses make internally
sudo systemctl start wedding-phone
```
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
**UV Integration:**
- Updated pyproject.toml with [tool.uv.scripts]
- Added 'uv run start' to launch wedding phone
- Added 'uv run test' to run audio tests
- Refactored main code into main() function
- Added proper entry point for package installation
**Systemd Service:**
- Created wedding-phone.service template
- Service runs with UV for dependency management
- Automatic restart on failure
- Proper security hardening (NoNewPrivileges, PrivateTmp)
- GPIO and audio group access configured
**Service Installer:**
- Created install_service.sh automated installer
- Auto-detects project path and user
- Checks for UV installation and dependencies
- Configures service file with correct paths
- Option to enable and start immediately
- Provides helpful command reference
**Installer Features:**
- Validates config.json exists (creates from example if missing)
- Installs UV dependencies automatically
- Updates service file paths dynamically
- Color-coded output for clarity
- Error checking at each step
- Clean installation process
**Usage:**
```bash
# Run directly with UV
uv run start
# Install as system service
./install_service.sh
# Service management
sudo systemctl start wedding-phone
sudo systemctl stop wedding-phone
sudo journalctl -u wedding-phone -f
```
**Documentation:**
- Updated README with UV commands
- Added service installation guide
- Removed old manual systemd instructions
- Added service management commands
- Updated file structure documentation
**Benefits:**
- Easier to run (single command)
- Automatic startup on boot
- Better dependency management
- Professional service integration
- Simplified installation process
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Features:
- Add pyproject.toml for UV package management
- Volume control with real-time slider (0-100%)
- Backend volume adjustment with numpy audio scaling
- Volume setting persists in config.json
- Debounced API calls for smooth slider interaction
- Enhanced audio playback with volume multiplier
- Update README with UV installation instructions
- Add volume control documentation
API Changes:
- GET /api/volume - Get current volume setting
- POST /api/volume - Set volume level
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>