Overview
Local-S2S-Translator enables real-time cross-language voice communication without any internet connection. Speak into your browser's microphone in your language, and hear the translation in the target language spoken back. Supports English, Spanish, and French.
Architecture
Four Docker services, each handling one stage of the pipeline:
- Orchestrator (port 8080): FastAPI + WebSocket gateway. Runs webrtcvad for utterance chunking, Resemblyzer for speaker diarization, and coordinates all stages
- STT (port 8001): faster-whisper (CTranslate2) on NVIDIA GPU
- Translate (port 8002): Argos Translate on CPU
- TTS (port 8003): Kokoro (ONNX) on CPU
The browser sends PCM16 16kHz audio over WebSocket to the orchestrator. The orchestrator chunks utterances via VAD, sends them through STT → MT → TTS, and streams translated audio back to the browser.
Features
- Real-time translation between English, Spanish, and French
- VAD-based utterance chunking: detects when you stop speaking before processing
- Speaker diarization: distinguishes up to 2 speakers (Speaker A / Speaker B)
- Echo guard: suppresses TTS audio bleeding back into the microphone
- Web UI: chat-style conversation bubbles, service status indicators, and config panel
- REST API: for status monitoring and runtime configuration
Technologies
Python
FastAPI
WebSocket
faster-whisper
Argos Translate
Kokoro
Docker
CUDA
vibe coded
Interesting Details
- No cloud services, no API keys required (HF token optional for faster model downloads)
- Service status indicators in the UI: green = ready, amber pulsing = loading, red = unreachable
- NVIDIA GPU required for the STT service; everything else runs on CPU
- LAN access possible with a reverse proxy and TLS (browsers block mic on non-secure origins except localhost)