Breaking Changes: - Configuration now via config.json instead of editing Python code - Remove all hardcoded paths (no more /home/berwn) - Separate system config (config.json) from runtime config (user_config.json) Features: - config.example.json with all configurable options - GPIO pin and state configuration - Audio device index configuration - Customizable paths (relative or absolute) - Web port and upload size settings - No code editing required for deployment Configuration Structure: - gpio: hook_pin, hook_pressed_state - audio: device_index, chunk_size, channels, sample_rate, max_record_seconds - paths: base_dir, recordings_dir, sounds_dir - web: port, max_upload_size_mb - system: active_greeting, default_volume Script automatically: - Checks for config.json on startup - Provides helpful error if missing - Uses relative paths by default - Loads test_complete.py config from same file Updated Documentation: - Complete configuration guide in README - Setup instructions without hardcoded paths - Troubleshooting for config errors - Device index discovery command 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
28 lines
495 B
JSON
28 lines
495 B
JSON
{
|
|
"gpio": {
|
|
"hook_pin": 17,
|
|
"hook_pressed_state": "LOW"
|
|
},
|
|
"audio": {
|
|
"device_index": 1,
|
|
"chunk_size": 1024,
|
|
"format": "paInt16",
|
|
"channels": 1,
|
|
"sample_rate": 44100,
|
|
"max_record_seconds": 300
|
|
},
|
|
"paths": {
|
|
"base_dir": "./rotary_phone_data",
|
|
"recordings_dir": "recordings",
|
|
"sounds_dir": "sounds"
|
|
},
|
|
"web": {
|
|
"port": 8080,
|
|
"max_upload_size_mb": 50
|
|
},
|
|
"system": {
|
|
"active_greeting": "dialtone.wav",
|
|
"volume": 70
|
|
}
|
|
}
|