How nbs282/livetranslate works
LiveTranslate is a local-first desktop interpreter: the user configures audio and languages, speaks into a microphone, and receives streaming subtitles plus translated speech routed to speakers or a virtual cable. The README documents native Parakeet transcription, language-pair translation, sentence-by-sentence TTS, voice cloning, setup, and updates. Sampled Rust and Python sources confirm the engine/server boundary and several setup and audio responsibilities; links involving unsampled frontend and translation modules follow the documented architecture and are kept at subsystem level.
Main entry points: lib.rs Command/event host · live.rs Live session · server.py Local API server · main.ts Main window
Components 28
Desktop UI
- Main window
src/main.ts - Subtitle overlay
src/overlay.ts - Voice controls
src/voice.ts - Live controls
src/live.ts - Translation settings
src/translate.ts - In-app updates
src/update.ts
Audio and translation
- Command/event host
src-tauri/src/lib.rs - Audio capture
src-tauri/src/audio/mod.rs - Audio passthrough
src-tauri/src/audio/passthrough.rs - Live session
src-tauri/src/translation/live.rs - Sentence segmenter
src-tauri/src/translation/segmenter.rs - Native STT engines
src-tauri/src/translation/engine - Python sidecar client
src-tauri/src/translation/sidecar.rs - Engine process manager
src-tauri/src/translation/engine_server.rs
Local AI engine
- Local API server
python/lt_engine/server.py - Cascade pipeline
python/lt_engine/pipeline.py - Voice synthesis
python/lt_engine/cloned_tts.py - Voice profile
python/lt_engine/voice_profile.py
Setup and models
- Setup workflow
src-tauri/src/setup.rs - Model catalog
src-tauri/src/models/catalog.rs - GGUF model manager
src-tauri/src/models/manager.rs - Download service
src-tauri/src/net/download.rs - Local model files
Other components
- Speaker
- Microphone
- Video call
- Virtual cable
- HuggingFace Hub
Connections 36
- Speaker → Microphone: speaks into
- Microphone → Audio capture: audio input
- Main window → Command/event host: invokes commands
- Main window → Live controls: configures session
- Live controls → Command/event host: starts capture
- Translation settings → Command/event host: sets languages
- Voice controls → Local API server: manages profile
- Command/event host → Audio capture: starts capture
- Command/event host → Live session: starts session
- Audio capture → Live session: captured audio
- Live session → Native STT engines: transcribes audio
- Live session → Sentence segmenter: segments speech
- Live session → Python sidecar client: requests translation
- Python sidecar client → Local API server: HTTP requests
- Command/event host → Engine process manager: ensures engine
- Engine process manager → Local API server: spawns process
- Native STT engines → Python sidecar client: fallback STT
- Local API server → Cascade pipeline: dispatches work
- Cascade pipeline → Voice synthesis: cloned synthesis
- Local API server → Voice profile: saves or deletes
- Live session → Subtitle overlay: partial and final events
- Command/event host → Subtitle overlay: PTT events
- Subtitle overlay → Speaker: shows subtitles
- Cascade pipeline → Live session: translation and audio result
- Live session → Audio passthrough: routes original audio
- Command/event host → Audio passthrough: starts passthrough
- Audio passthrough → Virtual cable: plays audio
- Virtual cable → Video call: call microphone input
- Speaker → Setup workflow: runs first setup
- Setup workflow → Model catalog: selects assets
- Setup workflow → GGUF model manager: prepares GGUF models
- GGUF model manager → Download service: downloads model
- GGUF model manager → Local model files: verifies and loads
- Download service → HuggingFace Hub: fetches assets
- Download service → Local model files: writes files
- Main window → In-app updates: checks update state