AI字幕生成2026:用Whisper给任意视频自动加字幕
字幕能提升完播率和可访问性,但手写要几小时。Whisper几分钟自动生成准确SRT字幕——免费。
AI Subtitles: The 10-Minute Workflow That Used to Take a Day
Auto-subtitling went from a paid service to a free local tool. OpenAI's Whisper (106,367 GitHub stars) transcribes any video's audio with word-level timestamps, and a few lines of Python convert that into a proper .srt subtitle file. The whole pipeline runs offline on a consumer GPU - no per-minute fees, no uploads.
The One-Line Command
whisper video.mp4 --model large-v3 --output_format srt
That produces video.srt with accurate timestamps, ready to embed or upload. For long videos, chunk the audio first (or use faster-whisper which handles long files efficiently).
Making Subtitles Actually Good
- Fix proper nouns. Whisper hallucinates names and brand terms; pass a list via --initial_prompt or post-process with find-replace.
- Line length. Split at ~42 characters for readability; players and shorts benefit from short lines.
- Multi-language. Whisper supports 99 languages, so you can generate subtitles in the original language or translate them to others (post-process with an LLM for quality).
- Bilingual subtitles. Popular for Chinese content: generate both zh and en SRTs and stack them - a pattern used by most Chinese tech channels in 2026.
Tools on Top of Whisper
- SubtitleEdit / Aegisub - free editors for fine-tuning timing and text.
- Auto-Editor style tools - use transcription timestamps to cut silent sections automatically.
- Video editors (CapCut, Descript) - built-in auto-captions use the same technology with a nicer UI.
Why Subtitles Matter More Than Ever
Platforms push captions hard in 2026: they improve accessibility, boost retention (most mobile viewing is sound-off), and help SEO - search engines index transcript-style captions. For YouTube, auto-captions from Whisper are often more accurate than YouTube's own, especially for technical terms.
FAQ
Is Whisper really free? Yes - MIT license; runs locally, no API key needed.
What model size should I use? large-v3 for accuracy; medium for speed; small for quick drafts.
Does it work with non-English audio? Yes - 99 languages, including Chinese, Japanese, and Spanish.
Can I translate subtitles automatically? Yes - generate in one language, then translate with an LLM or dedicated translation tool.
