LiveLearning × AIJiang Jiang
Automatic Subtitle Translator
Turns English YouTube course subtitles into side-by-side Traditional Chinese and English, running on my own computer with no API costs.
1. Situation
I wanted to learn AI from people like Andrej Karpathy, but many courses are entirely in English and a single video can run over ten hours. YouTube’s auto-captions often lag and translate poorly, and there was no official Chinese version to wait for.
2. Task
Build a tool that takes English subtitles and outputs side-by-side Traditional Chinese and English — reliable enough that I can watch a whole course without checking every line.
3. Action
With Claude Code’s help, I split the system into three layers. Written workflows describe what should happen. The AI handles judgment and coordination. Fixed Python scripts do the parsing, translating, formatting, and checking. Translation runs on a local Ollama model, with no paid API. Each segment is saved as soon as it’s done, so a run can resume after an interruption. At the end, five checks run automatically — leftover English, garbled text, Simplified Chinese, missing translations, and odd lengths. Later I added a Chrome extension that, together with a small service on my computer, queues a YouTube video for translation with one click.
4. Result
Thirteen videos translated, more than 25 hours in total, the longest one 10 hours, at zero translation cost. With the extension, going from “I want to learn from this video” to “I have a bilingual version” takes one click. The source code is on GitHub.
Tools used
- Claude Code
- Python
- Ollama (local model)
Links
Why three layers
If the AI handles every step directly and each step is right 90% of the time, five steps in a row leave you with only about 59% success overall.
So I gave the things that should be identical every time — reading files, formatting, checking structure — to fixed scripts. The AI only handles what needs judgment, like translating or deciding what to do when something fails. That made the whole pipeline much more dependable.
New: one click on YouTube (v1.1, November 2026)
At first I had to download the subtitle file and feed it to the tool by hand. That got old, so I built a Chrome extension:
- On a YouTube video page, click the extension and choose “Translate this video.”
- The extension sends the link to a small service on my computer, which queues it, downloads it, translates it, and burns the bilingual subtitles into the video.
- The icon shows the status — “…” while queued or working, “✓” when done. I get a desktop notification when it finishes and can open the result in Finder.
- If the computer restarts, unfinished videos pick up where they left off, and videos already translated are not redone.
The service only runs on my own computer and is not exposed to the internet. The output is for my own study only.
What the output looks like
00:00:08.160 --> 00:00:13.600
我想做的是從零開始建立一個類似 ChatGPT 的東西。
What I'd like to do is build something like ChatGPT from scratch.
The five quality checks
| Check | What it catches |
|---|---|
| Leftover English | Too much English left in the translation |
| Garbled text | Stray Japanese kana or formatting symbols the model made up |
| Simplified Chinese | The target is Traditional Chinese, so Simplified characters get flagged |
| Missing translation | Empty output, or output identical to the original |
| Odd length | Far too long or too short — possibly cut off or invented |