4 Commits

Author SHA1 Message Date
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
72e39f9515 Add production WSGI server and CLAUDE.md documentation
- 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>
2025-10-27 12:18:19 +07:00
d0bbaf6d4e Fix UV build issues by removing build system
**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>
2025-10-24 16:59:03 +07:00
bdeeb879cd Fix UV configuration and add Makefile
**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>
2025-10-24 16:54:37 +07:00