Add unified per-speaker font support and remote transcription service
Font changes: - Consolidate font settings into single Display Settings section - Support Web-Safe, Google Fonts, and Custom File uploads for both displays - Fix Google Fonts URL encoding (use + instead of %2B for spaces) - Fix per-speaker font inline style quote escaping in Node.js display - Add font debug logging to help diagnose font issues - Update web server to sync all font settings on settings change - Remove deprecated PHP server documentation files New features: - Add remote transcription service for GPU offloading - Add instance lock to prevent multiple app instances - Add version tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
# Node.js Multi-User Transcription Server
|
||||
|
||||
**Much better than PHP for real-time applications!**
|
||||
A real-time multi-user transcription sync server for streamers and teams.
|
||||
|
||||
## Why Node.js is Better Than PHP for This
|
||||
## Features
|
||||
|
||||
1. **Native WebSocket Support** - No SSE buffering issues
|
||||
2. **Event-Driven** - Designed for real-time connections
|
||||
3. **No Buffering Problems** - PHP-FPM/FastCGI buffering is a nightmare
|
||||
4. **Lower Latency** - Instant message delivery
|
||||
5. **Better Resource Usage** - One process handles all connections
|
||||
6. **Easy to Deploy** - Works on any VPS, cloud platform, or even Heroku free tier
|
||||
- **Real-time WebSocket** - Instant message delivery (< 100ms latency)
|
||||
- **Per-speaker fonts** - Each user can have their own font style
|
||||
- **Google Fonts support** - 1000+ free fonts loaded from CDN
|
||||
- **Web-safe fonts** - Universal fonts that work everywhere
|
||||
- **Custom font uploads** - Upload your own .ttf/.woff2 files
|
||||
- **Easy deployment** - Works on any VPS, cloud platform, or locally
|
||||
|
||||
## Quick Start
|
||||
|
||||
@@ -54,13 +54,35 @@ PORT=8080 npm start
|
||||
|
||||
Add a Browser source with this URL:
|
||||
```
|
||||
http://your-server.com:3000/display?room=YOUR_ROOM&fade=10×tamps=true
|
||||
http://your-server.com:3000/display?room=YOUR_ROOM&fade=10×tamps=true&fontsource=websafe&websafefont=Arial
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
- `room` - Your room name (required)
|
||||
- `fade` - Seconds before text fades (0 = never fade)
|
||||
- `timestamps` - Show timestamps (true/false)
|
||||
| Parameter | Default | Description |
|
||||
|-----------|---------|-------------|
|
||||
| `room` | default | Your room name (required) |
|
||||
| `fade` | 10 | Seconds before text fades (0 = never fade) |
|
||||
| `timestamps` | true | Show timestamps (true/false) |
|
||||
| `maxlines` | 50 | Max lines visible (prevents scroll bars) |
|
||||
| `fontsize` | 16 | Font size in pixels |
|
||||
| `fontsource` | websafe | Font source: `websafe`, `google`, or `custom` |
|
||||
| `websafefont` | Arial | Web-safe font name |
|
||||
| `googlefont` | Roboto | Google Font name |
|
||||
|
||||
**Font Examples:**
|
||||
```
|
||||
# Web-safe font (works everywhere)
|
||||
?room=myroom&fontsource=websafe&websafefont=Courier+New
|
||||
|
||||
# Google Font (loaded from CDN)
|
||||
?room=myroom&fontsource=google&googlefont=Open+Sans
|
||||
|
||||
# Custom font (uploaded by users)
|
||||
?room=myroom&fontsource=custom
|
||||
```
|
||||
|
||||
**Per-Speaker Fonts:**
|
||||
Each user can set their own font in the desktop app (Settings → Multi-User Server Sync → Font Source). Per-speaker fonts override the URL defaults, so different speakers can have different fonts on the same display.
|
||||
|
||||
## API Endpoints
|
||||
|
||||
@@ -74,7 +96,9 @@ Content-Type: application/json
|
||||
"passphrase": "my-secret",
|
||||
"user_name": "Alice",
|
||||
"text": "Hello everyone!",
|
||||
"timestamp": "12:34:56"
|
||||
"timestamp": "12:34:56",
|
||||
"font_family": "Open Sans", // Optional: per-speaker font
|
||||
"font_type": "google" // Optional: websafe, google, or custom
|
||||
}
|
||||
```
|
||||
|
||||
@@ -282,17 +306,6 @@ Ports below 1024 require root. Either:
|
||||
- Average latency: < 100ms
|
||||
- Memory usage: ~50MB
|
||||
|
||||
## Comparison: Node.js vs PHP
|
||||
|
||||
| Feature | Node.js | PHP (SSE) |
|
||||
|---------|---------|-----------|
|
||||
| Real-time | ✅ WebSocket | ⚠️ SSE (buffering issues) |
|
||||
| Latency | < 100ms | 1-5 seconds (buffering) |
|
||||
| Connections | 1000+ | Limited by PHP-FPM |
|
||||
| Setup | Easy | Complex (Apache/Nginx config) |
|
||||
| Hosting | VPS, Cloud | Shared hosting (problematic) |
|
||||
| Resource Usage | Low | High (one PHP process per connection) |
|
||||
|
||||
## License
|
||||
|
||||
Part of the Local Transcription project.
|
||||
|
||||
Reference in New Issue
Block a user