LecTrans is a desktop translation tool built for Chinese students studying in South Korea. It captures lecture audio in real time, transcribes Korean speech, translates it into Chinese with Xiaomi MiMo, and shows both languages side by side. After class it generates structured notes, saves recordings, and exports Markdown.
Developed with the help of MiMo Code, it targets four pain points:
- ๐ง Language barrier: Korean lectures are hard to follow in real time
- ๐ Note-taking: manual translation cannot keep up with the lecture
- ๐ Classroom etiquette: fully silent, dark UI, no disturbance
- ๐ Review: bilingual records and structured summaries are saved automatically
| Feature | Description |
|---|---|
| Dual ASR engines | Local faster-whisper (offline, adaptive energy VAD) or Azure Speech (cloud) |
| Context-aware translation | Recent N bilingual pairs are sent as context for term/pronoun consistency |
| Term glossary | Built-in KoreanโChinese CS glossary injected into the prompt |
| Single audio pipeline | One microphone stream feeds both ASR and recording (no device contention) |
| Recording archive | Streams WAV to disk while recording; converts to MP3 on stop (falls back to WAV) |
| One-click summary | Structured notes: key concepts / knowledge points / assignments / open questions |
| History manager | Session list, bilingual review, playback, reveal in folder, delete, Markdown export |
| Silent mode | Apple-inspired dark UI, no audio output |
- MiMo TTS speech playback: synthesize translations to speech and play quietly through earphones
- Streaming translation output (currently sentence-based)
- PDF / Word export
- More language pairs (English, Japanese)
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ
โ AudioRecorderโโโโถโ ASR โโโโถโ Translation โโโโถโ UI (2 cols)โ
โ single streamโ โ faster-whisper/Azureโ โ MiMo+context โ โ tkinter โ
โโโโโโโโฌโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโฌโโโโโโโ
โ streams WAV to disk โ
โผ โผ
MP3 archive โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ SessionManager
(JSON + Markdown)
See docs/ARCHITECTURE.md for details.
Requirements: Python 3.11+, microphone access, a MiMo API key (Azure key only for the Azure engine).
pip install -r requirements.txt
python main.pyOn first launch the settings dialog opens automatically: enter your MiMo API key and choose local (faster-whisper, downloads the model on first run) or azure (Azure Speech key required).
Configuration options:
- In-app settings (recommended) โ keys are stored in the system keyring when available
- Environment variables โ see .env.example (
LECTRANS_*overrides) - Config file โ
~/.lectrans/config.json(only used when keyring is unavailable)
build.batProduces dist\LecTrans.exe from a portable LecTrans.spec (no hard-coded paths).
Note: the exe bundles the Azure engine only; use the source install for offline faster-whisper.
See BUILD_GUIDE.md.
pip install -r requirements-dev.txt
python -m unittest discover -s tests -t . -v # or pytest
python -m ruff check .CI (GitHub Actions) runs unit tests, compile checks and ruff on Windows.
lectrans/
โโโ main.py # entry point (dotenv โ logging โ UI)
โโโ config.py # JSON + keyring + env overrides
โโโ core/ # audio pipeline, recognizers, translator, sessions, logging
โโโ ui/ # tkinter UI (design system, main window, dialogs)
โโโ prompts/templates.py # translation / summary prompts and glossary
โโโ tests/ # unittest suite (optional deps auto-skipped)
โโโ docs/ # PRD / architecture / UI spec
โโโ LecTrans.spec # portable PyInstaller config
| Path | Content |
|---|---|
~/.lectrans/config.json |
Settings (LECTRANS_HOME overrides the root) |
~/.lectrans/sessions/ |
Session JSON files |
~/.lectrans/recordings/ |
Lecture recordings (WAV/MP3) |
~/.lectrans/lectrans.log |
Rotating log (1MB ร 3) |
MIT License, see LICENSE.
LecTrans ๆฏไธๆฌพไธไธบๅจ้ฉไธญๅฝ็ๅญฆ็ๆ้ ็ๅฎๆถ่ฏพๅ ็ฟป่ฏๆก้ขๅทฅๅ ท๏ผ่ฏพๅ ไธ้้ๆๆ่ฏญ้ณ๏ผ ่ฏๅซไธบ้ฉ่ฏญๆๆฌๅ่ฐ็จๅฐ็ฑณ MiMo ๅคงๆจกๅ็ฟป่ฏๆไธญๆ๏ผๅๆ ๅฏน็ งๅฑ็คบ๏ผ่ฏพๅ่ชๅจไฟๅญๅฝ้ณไธ ไผ่ฏ๏ผ็ๆ็ปๆๅ็ฌ่ฎฐๅนถๅฏผๅบ Markdownใ
้กน็ฎๅจ MiMo Code ๅๅฉไธๅฎๆๅผๅ๏ผไธป่ฆ่งฃๅณๅไธช็็น๏ผ
- ๐ง ่ฏญ่จ้็ข๏ผ้ฉ่ฏญๆ่ฏพๅฎๆถๅฌไธๆ
- ๐ ็ฌ่ฎฐๆ็๏ผๆๅจ็ฟป่ฏ่ทไธไธ่ฏพๅ ่ๅฅ
- ๐ ่ฏพๅ ็คผไปช๏ผๅ จ็จ้้ณใๆ่ฒ็้ข๏ผไธๆๆฐไปไบบ
- ๐ ่ฏพๅๅคไน ๏ผ่ชๅจไฟๅญๅ่ฏญ่ฎฐๅฝไธ่ฏพๅ ๆป็ป
| ๅ่ฝ | ่ฏดๆ |
|---|---|
| ๅ ASR ๅผๆ | ๆฌๅฐ faster-whisper๏ผ็ฆป็บฟใ่ช้ๅบ่ฝ้ VAD๏ผๆ Azure Speech๏ผไบ็ซฏ๏ผ |
| ไธไธๆ็ฟป่ฏ | ็ฟป่ฏๆถๆบๅธฆๆ่ฟ N ๆกๅ่ฏญๅฏน็ ง๏ผๆฏ่ฏญไธๆไปฃๆด่ฟ่ดฏ |
| ๆฏ่ฏญๅขๅผบ | ๅ ็ฝฎ่ฎก็ฎๆบ้ฉไธญๆฏ่ฏญ่กจ๏ผPrompt ่ชๅจๆณจๅ ฅ |
| ๅ่ทฏ้ณ้ข็ฎก็บฟ | ไธๆฌก้้ๅๆถ็จไบ่ฏๅซไธๅฝ้ณ๏ผ้ฟๅ ่ฎพๅคไบๆข |
| ๅฝ้ณๅญๆกฃ | ่พนๅฝ่พนๅ WAV๏ผๅๆญขๅ่ฝฌ MP3๏ผ็ผบ ffmpeg ่ชๅจๅ้ WAV๏ผ |
| ไธ้ฎๆป็ป | ็ๆใๆ ธๅฟๆฆๅฟต / ้่ฆ็ฅ่ฏ็น / ไฝไธ่่ฏ / ๅพ ็กฎ่ฎค้ฎ้ขใ็ปๆๅ็ฌ่ฎฐ |
| ๅๅฒ็ฎก็ | ไผ่ฏๅ่กจใๅ่ฏญๅ็ใๅฝ้ณๆญๆพใๅฎไฝๆไปถใๅ ้คใๅฏผๅบ Markdown |
| ๅฎ้ๆจกๅผ | Apple ้ฃๆ ผๆทฑ่ฒ UI๏ผๆ ไปปไฝๅฃฐ้ณ่พๅบ |
- MiMo TTS ่ฏญ้ณๆญๆฅ๏ผๅฐ่ฏๆๅฎๆถๅๆไธบ่ฏญ้ณ๏ผ้่ฟ่ณๆบไฝ้ณ้ๆญๆพ๏ผ่ฟไธๆญฅ่ทจ่ถ่ฏญ่จ้็ข
- ็ฟป่ฏๆตๅผ่พๅบ๏ผๅฝๅไธบๆดๅฅ่ฟๅ๏ผ
- ๅฏผๅบ PDF / Word
- ๅค่ฏญ่จๅฏนๆฉๅฑ๏ผ่ฑ่ฏญใๆฅ่ฏญ๏ผ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ
โ AudioRecorderโโโโถโ ASR โโโโถโ ็ฟป่ฏ Worker โโโโถโ UI ๅๆ ๅฑ็คบ โ
โ ๅ่ทฏ้้ โ โ faster-whisper/Azureโ โ MiMo + ไธไธๆ โ โ tkinter โ
โโโโโโโโฌโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโฌโโโโโโโ
โ ่พนๅฝ่พนๅ WAV โ
โผ โผ
MP3 ๅญๆกฃ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ SessionManager
(JSON + Markdown)
่ฏฆ็ป่ฎพ่ฎก่ง docs/ARCHITECTURE.mdใ
็ฏๅข่ฆๆฑ๏ผPython 3.11+ใ้บฆๅ ้ฃๆ้ใMiMo API Key๏ผไป Azure ๅผๆ้่ฆ Azure Key๏ผใ
pip install -r requirements.txt
python main.py้ฆๆฌกๅฏๅจไผ่ชๅจๅผนๅบ่ฎพ็ฝฎ็ชๅฃ๏ผๅกซๅ ฅ MiMo API Key๏ผๅนถ้ๆฉ local๏ผๆฌๅฐ faster-whisper๏ผ ้ฆๆฌก่ฟ่ก่ชๅจไธ่ฝฝๆจกๅ๏ผๆ azure๏ผ้่ฆ Azure Speech Key๏ผใ
้ ็ฝฎๆนๅผ๏ผ
- ๅบ็จๅ ่ฎพ็ฝฎ๏ผๆจ่๏ผ๏ผๅฏ้ฅไผๅ ๅๅ ฅ็ณป็ป้ฅๅไธฒ
- ็ฏๅขๅ้่ฆ็๏ผ่ง .env.example๏ผๆฏๆ
LECTRANS_*ๅ้ - ้
็ฝฎๆไปถ๏ผ
~/.lectrans/config.json๏ผkeyring ไธๅฏ็จๆถๅฏ้ฅๆ่ฝ็๏ผ
build.batไบง็ฉไธบ dist\LecTrans.exe๏ผๅบไบๅฏ็งปๆค็ LecTrans.spec๏ผๆ ็กฌ็ผ็ ่ทฏๅพ๏ผใ
ๆณจ๏ผexe ๅ
็ฝฎ Azure ๅผๆ๏ผ้่ฆๆฌๅฐ faster-whisper ็ฆป็บฟ่ฏๅซๆถ่ฏท็จๆบ็ ่ฟ่กใ
่ฏฆ่ง BUILD_GUIDE.mdใ
pip install -r requirements-dev.txt
python -m unittest discover -s tests -t . -v # ๆ pytest
python -m ruff check .CI๏ผGitHub Actions๏ผๅจ Windows ไธ่ฟ่กๅๅ ๆต่ฏใ็ผ่ฏๆฃๆฅไธ ruff ๆฃๆฅใ
lectrans/
โโโ main.py # ๅ
ฅๅฃ๏ผๅ ่ฝฝ .envใๅๅงๅๆฅๅฟใๅฏๅจ UI๏ผ
โโโ config.py # ้
็ฝฎ๏ผJSON + keyring + ็ฏๅขๅ้่ฆ็
โโโ core/ # ้ณ้ข็ฎก็บฟใ่ฏๅซๅจใ็ฟป่ฏใไผ่ฏใๆฅๅฟ
โโโ ui/ # tkinter ็้ข๏ผ่ฎพ่ฎก็ณป็ปใไธป็ชใๅฏน่ฏๆก๏ผ
โโโ prompts/templates.py # ็ฟป่ฏ/ๆป็ป Prompt ไธๆฏ่ฏญ่กจ
โโโ tests/ # unittest ๆต่ฏ๏ผๅฏ้ไพ่ต่ชๅจ่ทณ่ฟ๏ผ
โโโ docs/ # PRD / ๆถๆ / UI ่ง่
โโโ LecTrans.spec # ๅฏ็งปๆค PyInstaller ้
็ฝฎ
| ่ทฏๅพ | ๅ ๅฎน |
|---|---|
~/.lectrans/config.json |
้
็ฝฎ๏ผๅฏ็จ LECTRANS_HOME ่ฆ็ๆ น็ฎๅฝ๏ผ |
~/.lectrans/sessions/ |
ไผ่ฏ JSON |
~/.lectrans/recordings/ |
่ฏพๅ ๅฝ้ณ๏ผWAV/MP3๏ผ |
~/.lectrans/lectrans.log |
่ฟ่กๆฅๅฟ๏ผๆปๅจ 1MB ร 3๏ผ |
MIT License๏ผ่ฏฆ่ง LICENSEใ
Made with โค๏ธ for international students in South Korea ยท Built with MiMo Code