Enhance display customization and remove PHP server

Major improvements to display configuration and server architecture:

**Display Enhancements:**
- Add URL parameters for display customization (timestamps, maxlines, fontsize, fontfamily)
- Fix max lines enforcement to prevent scroll bars in OBS
- Apply font family and size settings to both local and sync displays
- Remove auto-scroll, enforce overflow:hidden for clean OBS integration

**Node.js Server:**
- Add timestamps toggle: timestamps=true/false
- Add max lines limit: maxlines=50
- Add font configuration: fontsize=16, fontfamily=Arial
- Update index page with URL parameters documentation
- Improve display URLs in room generation

**Local Web Server:**
- Add max_lines, font_family, font_size configuration
- Respect settings from GUI configuration
- Apply changes immediately without restart

**Architecture:**
- Remove PHP server implementation (Node.js recommended)
- Update all documentation to reference Node.js server
- Update default config URLs to Node.js endpoints
- Clean up 1700+ lines of PHP code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-27 06:15:55 -08:00
parent e831dadd24
commit 146a8c8beb
16 changed files with 76 additions and 1719 deletions

View File

@@ -10,7 +10,7 @@ Local Transcription is a desktop application for real-time speech-to-text transc
- Standalone desktop GUI (PySide6/Qt)
- Local transcription with CPU/GPU support
- Built-in web server for OBS browser source integration
- Optional PHP-based multi-user server for syncing transcriptions across users
- Optional Node.js-based multi-user server for syncing transcriptions across users
- Noise suppression and Voice Activity Detection (VAD)
- Cross-platform builds (Linux/Windows) with PyInstaller
@@ -29,12 +29,12 @@ local-transcription/
│ ├── main_window_qt.py # Main application window (PySide6)
│ ├── settings_dialog_qt.py # Settings dialog (PySide6)
│ └── transcription_display_qt.py # Display widget
├── server/ # Web display server
│ ├── web_display.py # FastAPI server for OBS browser source
│ └── php/ # Optional multi-user PHP server
│ ├── server.php # Multi-user sync server
│ ├── display.php # Multi-user web display
│ └── README.md # PHP server documentation
├── server/ # Web display servers
│ ├── web_display.py # FastAPI server for OBS browser source (local)
│ └── nodejs/ # Optional multi-user Node.js server
│ ├── server.js # Multi-user sync server with WebSocket
│ ├── package.json # Node.js dependencies
│ └── README.md # Server deployment documentation
├── config/ # Example configuration files
│ └── default_config.yaml # Default settings template
├── main.py # GUI application entry point
@@ -128,28 +128,20 @@ uv run python -m uvicorn server.web_display:app --reload
- Used for OBS browser source integration
- Single-user (displays only local transcriptions)
**Multi-User Servers** (Optional - for syncing across multiple users)
**Multi-User Server** (Optional - for syncing across multiple users)
Three options available:
**Node.js WebSocket Server** ([server/nodejs/](server/nodejs/)) - **RECOMMENDED**
- Real-time WebSocket support (< 100ms latency)
- Handles 100+ concurrent users
- Easy deployment to VPS/cloud hosting (Railway, Heroku, DigitalOcean, or any VPS)
- Configurable display options via URL parameters:
- `timestamps=true/false` - Show/hide timestamps
- `maxlines=50` - Maximum visible lines (prevents scroll bars in OBS)
- `fontsize=16` - Font size in pixels
- `fontfamily=Arial` - Font family
- `fade=10` - Seconds before text fades (0 = never)
1. **PHP with Polling** ([server/php/display-polling.php](server/php/display-polling.php)) - **RECOMMENDED for PHP**
- Works on ANY shared hosting (no buffering issues)
- Uses HTTP polling instead of SSE
- 1-2 second latency, very reliable
- File-based storage, no database needed
2. **Node.js WebSocket Server** ([server/nodejs/](server/nodejs/)) - **BEST PERFORMANCE**
- Real-time WebSocket support (< 100ms latency)
- Handles 100+ concurrent users
- Requires VPS/cloud hosting (Railway, Heroku, DigitalOcean)
- Much better than PHP for real-time applications
3. **PHP with SSE** ([server/php/display.php](server/php/display.php)) - **NOT RECOMMENDED**
- Has buffering issues on most shared hosting
- PHP-FPM incompatibility
- Use polling or Node.js instead
See [server/COMPARISON.md](server/COMPARISON.md) and [server/QUICK_FIX.md](server/QUICK_FIX.md) for details
See [server/nodejs/README.md](server/nodejs/README.md) for deployment instructions
### Configuration System
@@ -281,19 +273,17 @@ See [server/COMPARISON.md](server/COMPARISON.md) and [server/QUICK_FIX.md](serve
3. URL: `http://localhost:8080`
4. Set dimensions (e.g., 1920x300)
### Multi-User Display (PHP Server - Polling)
1. Deploy PHP server to web hosting
2. Each user enables "Server Sync" in settings
3. Enter same room name and passphrase
4. In OBS: Add "Browser" source
5. URL: `https://your-domain.com/transcription/display-polling.php?room=ROOM&fade=10`
### Multi-User Display (Node.js Server)
1. Deploy Node.js server (see [server/nodejs/README.md](server/nodejs/README.md))
2. Each user configures Server URL: `http://your-server:3000/api/send`
3. Enter same room name and passphrase
4. In OBS: Add "Browser" source
5. URL: `http://your-server:3000/display?room=ROOM&fade=10`
5. URL: `http://your-server:3000/display?room=ROOM&fade=10&timestamps=true&maxlines=50&fontsize=16`
6. Customize URL parameters as needed:
- `timestamps=false` - Hide timestamps
- `maxlines=30` - Show max 30 lines (prevents scroll bars)
- `fontsize=18` - Larger font
- `fontfamily=Courier` - Different font
## Performance Optimization
@@ -314,7 +304,7 @@ See [server/COMPARISON.md](server/COMPARISON.md) and [server/QUICK_FIX.md](serve
-**Phase 1**: Standalone desktop application (complete)
-**Web Server**: Local OBS integration (complete)
-**Builds**: PyInstaller executables (complete)
- 🚧 **Phase 2**: Multi-user PHP server (functional, optional)
- **Phase 2**: Multi-user Node.js server (complete, optional)
- ⏸️ **Phase 3+**: Advanced features (see [NEXT_STEPS.md](NEXT_STEPS.md))
## Related Documentation
@@ -323,4 +313,4 @@ See [server/COMPARISON.md](server/COMPARISON.md) and [server/QUICK_FIX.md](serve
- [BUILD.md](BUILD.md) - Detailed build instructions
- [INSTALL.md](INSTALL.md) - Installation guide
- [NEXT_STEPS.md](NEXT_STEPS.md) - Future enhancements
- [server/php/README.md](server/php/README.md) - PHP server setup
- [server/nodejs/README.md](server/nodejs/README.md) - Node.js server setup and deployment