How huankechong/qwenlivetranslate works
Qwen LiveTranslate is a Windows desktop live-caption translator. The main flow is console configuration and start → microphone or system-loopback capture → session controller and engine → streamed or separated ASR/translation → bilingual overlay, with completed sentences also available in local history. The graph includes the documented provider choices, vocabulary, appearance, and persistence features. Relationships for unsampled UI and storage details rely on README or SOURCE INDEX references; uncertain implementation links are omitted.
Main entry points: console.py Control Console · controller.py Session Controller · __init__.py Engine Factory · http_batch.py Batch ASR
Components 25
Desktop UI
- Control Console
console.py - Caption Overlay
overlay.py - Theme Engine
theme.py - History Window
history_view.py - Vocabulary Window
vocab_view.py
Audio Session
- Session Controller
controller.py - Audio Capture
capture.py - Audio Push Loop
providers/engine_io.py
Speech Engines
- Engine Factory
providers/__init__.py - Provider Registry
providers/registry.py - Engine Interface
providers/base.py - Qwen Engine
providers/qwen_livetranslate.py - Realtime Client
realtime_client.py - VAD Segmenter
providers/vad.py - Batch ASR
providers/asr/http_batch.py - Separated Pipeline
providers/pipeline.py - Translation Worker
providers/translation_worker.py - Chat Translator
providers/mt/openai_compat.py
Local Features
- User Settings
settings.py - Translation History
history.py - Vocabulary Store
vocabulary.py
Other components
- User
- Mic / Loopback
- DashScope API
- ASR / MT APIs
Connections 30
- User → Control Console: configures and starts
README.md - Control Console → Session Controller: starts session
console.py - Control Console → Caption Overlay: controls captions
console.py - Control Console → History Window: opens history
README.md - Control Console → Vocabulary Window: opens vocabulary
console.py - Control Console → User Settings: saves preferences
README.md - Control Console → Theme Engine: uses styling
console.py - Caption Overlay → Theme Engine: uses styling
overlay.py - Mic / Loopback → Audio Capture: provides audio
README.md - Session Controller → Audio Capture: starts and stops
controller.py - Session Controller → Engine Factory: builds engine
controller.py - Session Controller → Audio Push Loop: starts push loop
controller.py - Audio Capture → Audio Push Loop: provides audio frames
providers/engine_io.py - Audio Push Loop → Engine Interface: pushes audio
providers/engine_io.py - Engine Factory → Provider Registry: resolves providers
providers/__init__.py - Engine Factory → Qwen Engine: builds integrated engine
providers/__init__.py - Engine Factory → Separated Pipeline: builds separated engine
providers/__init__.py - Qwen Engine → Realtime Client: uses protocol client
providers/qwen_livetranslate.py - Realtime Client → DashScope API: streams audio and text
README.md - Separated Pipeline → Batch ASR: connects and pushes audio
providers/pipeline.py - Batch ASR → VAD Segmenter: segments speech
providers/asr/http_batch.py - Batch ASR → ASR / MT APIs: requests transcription
providers/asr/http_batch.py - Separated Pipeline → Translation Worker: submits recognized text
providers/pipeline.py - Translation Worker → Chat Translator: translates queued text
providers/translation_worker.py - Chat Translator → ASR / MT APIs: requests translation
providers/mt/openai_compat.py - Engine Interface → Caption Overlay: delivers caption callbacks
- History Window → Translation History: reads and exports
history_view.py - Control Console → Translation History: records final sentences
README.md - Vocabulary Window → Vocabulary Store: reads and edits
vocab_view.py - User Settings → Translation History: provides storage settings
history.py