How xiaokunshi5-lang/harry-translate-v2 works
HARRY Translate V2 is a desktop real-time interpretation app: it captures microphone or system audio, sends framed audio to a realtime translation engine, and presents source and translated subtitles in an overlay. The backend also manages sessions, glossary terms, silent correction, and optional summaries; the React UI provides monitoring and configuration, while Tauri hosts native windows. The README documents these capabilities; sampled excerpts and the source index support the main component boundaries, but not every runtime wiring detail, so uncertain links are omitted.
Main entry points: main.py Backend API · session_manager.py Session Manager · App.tsx UI Router · registry.py Engine Registry
Components 27
Audio Capture
- Capture Backends
app/audio/backend.py - WASAPI Capture
app/audio/wasapi.py - Frame and AGC Pipeline
app/audio/pipeline.py - Audio Mixer
app/audio/mixer.py
Translation Backend
- Backend API
app/main.py - Session Manager
app/session_manager.py - Engine Registry
app/engines/registry.py - Realtime Engine Contract
app/engines/base.py - Qwen Realtime
app/engines/qwen_realtime.py - Settings Store
app/config_store.py - Glossary Store
app/glossary/store.py - Glossary Matching
app/glossary/engine.py - Transcript Cleaner
app/transcript_cleaner.py - Silent Correction
app/bypass/patch_worker.py - Key Point Summary
app/bypass/summary_worker.py
User Interface
- UI Router
frontend/src/App.tsx - Monitor Screens
frontend/src/screens/MonitorScreens.tsx - Settings View
frontend/src/screens/SettingsView.tsx - Subtitle Overlay
frontend/src/windows/overlay/OverlayWindow.tsx - WebSocket Client
frontend/src/shared/wsClient.ts - HTTP Client
frontend/src/shared/apiClient.ts
Desktop Host
- Tauri Host
src-tauri/src/lib.rs - Backend Sidecar
src-tauri/src/sidecar.rs - Native Windows
src-tauri/src/windows/overlay.rs
Other components
- User
- Audio Devices
- Qwen Service
Connections 29
- Audio Devices → Capture Backends: provides input
README.md - Audio Devices → WASAPI Capture: provides loopback
README.md - Capture Backends → Frame and AGC Pipeline: feeds audio
app/audio/backend.py - WASAPI Capture → Frame and AGC Pipeline: frames audio
app/audio/wasapi.py - Audio Mixer → Frame and AGC Pipeline: uses framing
app/audio/mixer.py - Backend API → Audio Mixer: configures capture
app/main.py - Backend API → Session Manager: manages sessions
app/main.py - Session Manager → Engine Registry: selects engine
app/session_manager.py - Engine Registry → Realtime Engine Contract: implements contract
app/engines/registry.py - Engine Registry → Qwen Realtime: registers provider
app/engines/registry.py - Qwen Realtime → Qwen Service: streams audio
README.md - Session Manager → Transcript Cleaner: cleans transcripts
app/session_manager.py - Session Manager → Glossary Matching: applies fixes
app/session_manager.py - Glossary Store → Glossary Matching: builds term indexes
app/glossary/store.py - Backend API → Settings Store: loads settings
app/main.py - Backend API → Silent Correction: starts worker
app/main.py - Backend API → Key Point Summary: starts worker
app/main.py - User → UI Router: opens app
frontend/src/App.tsx - UI Router → Monitor Screens: routes monitor
frontend/src/App.tsx - UI Router → Settings View: routes settings
frontend/src/App.tsx - UI Router → Subtitle Overlay: routes overlay
frontend/src/App.tsx - Monitor Screens → WebSocket Client: receives events
- Settings View → HTTP Client: requests settings
frontend/src/screens/SettingsView.tsx - WebSocket Client → Backend API: exchanges events
README.md - HTTP Client → Backend API: calls endpoints
README.md - Tauri Host → Backend Sidecar: manages process
src-tauri/src/lib.rs - Tauri Host → Native Windows: hosts windows
- Backend Sidecar → Backend API: launches backend
src-tauri/src/sidecar.rs - User → Audio Devices: speaks or plays
README.md