Features: - Configurable extra button on any GPIO pin - Upload and select custom sound for button press - Non-blocking button operation (separate thread) - Debounced to prevent double-triggers (0.5s) - Works independently from phone handset - Can be pressed anytime, even during recording Configuration: - gpio.extra_button_enabled: Enable/disable feature - gpio.extra_button_pin: GPIO pin number (default: 27) - gpio.extra_button_pressed_state: "LOW" or "HIGH" - system.extra_button_sound: Default sound file Web Interface: - Display active button sound in alert - "🔘 Set Button" action on greeting items - Visual indicator (🔘) for active button sound - Upload any WAV file and assign to button - Play/preview button sounds in browser Backend: - RotaryPhone.play_extra_button_sound() method - RotaryPhone.set_extra_button_sound() method - Thread-based playback to not block main loop - /set_extra_button_sound API endpoint - Extra button sound tracked in user_config.json Documentation: - Extra button setup in README - Configuration examples - GPIO pin configuration - Operation workflow Use Cases: - Play special message on button press - Sound effects for wedding games - Multiple interaction points - Custom audio triggers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
644 B
JSON
32 lines
644 B
JSON
{
|
|
"gpio": {
|
|
"hook_pin": 17,
|
|
"hook_pressed_state": "LOW",
|
|
"extra_button_enabled": true,
|
|
"extra_button_pin": 27,
|
|
"extra_button_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",
|
|
"extra_button_sound": "button_sound.wav",
|
|
"volume": 70
|
|
}
|
|
}
|