Real-time audio translation distribution system. A translator speaks into a mic in the booth — their audio streams live to listener phones, with live word-by-word transcription powered by Deepgram.
church-translator/
├── server/
│ ├── server.js # Node.js WebSocket + Express server
│ └── package.json
└── public/
├── booth.html # Translator input page
└── listener.html # Congregation output page
1. Install dependencies
cd server && npm install2. Set your Deepgram API key (required for transcription; audio relay works without it)
export DEEPGRAM_API_KEY=your_key_here3. Start the server
node server.js4. Open pages
- Translator booth:
http://localhost:3000/booth.html - Listener phones:
http://localhost:3000/listener.html
Listeners must be on the same network. Use the machine's LAN IP (e.g.
http://192.168.1.x:3000/listener.html), notlocalhost.
Deploy the server/ directory to a VPS (Railway, Render, DigitalOcean, etc.).
The HTML files automatically use wss:// (secure WebSocket) when served over HTTPS — no code changes needed.
Set the DEEPGRAM_API_KEY environment variable in your hosting platform's dashboard.
- Booth captures mic audio via
MediaRecorder(WebM/Opus, 250ms chunks) and sends binary chunks over WebSocket. - Server fans out the binary audio to all connected listener clients and simultaneously forwards it to Deepgram for transcription.
- Listeners receive binary audio chunks, decode them with the Web Audio API, and play them back with a jitter buffer to avoid gaps. Transcript text appears line by line as Deepgram returns results.
Safari on iOS requires a user gesture to start audio playback. Listeners on iPhone/iPad will see a "Tap to Start Audio" prompt on first connection.