AI 驱动的口播视频剪辑工具 — 语音转录 → 自动编辑决策 → 文字驱动交互式编辑器 → 字幕烧录渲染。
- AI 语音转录:基于 faster-whisper(CPU int8 量化),词级时间戳,支持 VAD 静音过滤
- 自动编辑决策:智能检测 4 类可剪内容
- 🗑️ 去口癖:自动识别"嗯""啊""那个"等填充词和犹豫音
- 🔁 去重拍:检测重复句子(retake),保留最终版本
- ⏸️ 停顿压缩:长沉默间隙自动压缩到 0.3s
- ✂️ 去假启动:检测未说完就重新开始的句子
- Descript 风格文字编辑器:看口播稿文字,删文字就删视频
- 单击文字 → 视频跳转到对应位置
- 双击文字 → 删除/恢复对应视频段落
- 滚动口播稿 → 视频同步跟随
- 实时预览:预览成片效果,自动跳过已删除内容,支持暂停和拖动
- 字幕编辑:可修改每条字幕文字,实时预览字幕效果
- 字幕烧录:FFmpeg libass 烧录,支持中文字体
- 全屏编辑:整个应用全屏(视频 + 口播稿都可见)
# 1. 安装依赖
python setup.py
# 2. 转录 + 分析(dry-run 模式,不渲染)
python main.py input.mp4 --dry-run -v
# 3. 启动交互式编辑器
python editor_server.py
# 打开 http://localhost:8765
# 4. 在编辑器中调整后点「渲染视频」
# 或直接命令行渲染:
python main.py input.mp4 -v- Python 3.10+
- FFmpeg(由 imageio-ffmpeg 自动提供,无需单独安装)
- 网络连接(首次运行需下载 Whisper 模型,约 150MB)
main.py <input_video> [options]
--dry-run 仅转录分析,不渲染
--no-resize 保持原始分辨率(不缩放到 1080×1920)
--no-subtitles 不烧录字幕
--keep-high-only 仅应用高置信度剪切
--force-transcribe 重新转录(忽略缓存)
-v, --verbose 详细输出
| 步骤 | 耗时(2 分钟视频,CPU) |
|---|---|
| 音频提取 | ~2s |
| Whisper 转录 (base) | ~35s |
| 编辑分析 | <1s |
| 视频切片拼接 | ~10s |
| 字幕烧录 | ~5min |
| 总计 | ~6min |
talking-head-editor/
├── config.py # 全局配置
├── transcribe.py # Whisper 语音转录
├── edit_engine.py # 编辑决策引擎
├── video_processor.py # FFmpeg 视频处理
├── main.py # CLI 流水线
├── editor_server.py # Web 编辑器服务器
├── editor.html # 交互式编辑器界面
├── render.py # 从编辑决策渲染视频
├── fix_transcript.py # 转录文字纠正
├── extract_ffmpeg.py # FFmpeg 提取工具
├── setup.py # 环境安装脚本
├── requirements.txt # Python 依赖
├── docs/
│ └── architecture.md # 架构文档
└── tests/
├── test_pipeline.py # 端到端测试
└── generate_test.py # 测试数据生成
- AI Transcription: faster-whisper (CPU int8), word-level timestamps, VAD filter
- Auto Edit Decisions: detects 4 types of removable content
- Filler words ("um", "uh", "嗯", "啊")
- Retakes (repeated sentences, keeps last version)
- Long pauses (compresses to 0.3s)
- False starts (incomplete sentences immediately retried)
- Descript-style Text Editor: delete text = delete video
- Single click → seek video to position
- Double click → toggle delete/restore
- Scroll transcript → video follows
- Live Preview: play with automatic skipping of deleted regions
- Subtitle Editing: edit subtitle text per segment, live preview
- Subtitle Burn-in: FFmpeg libass, Chinese font support
- Fullscreen: whole-app fullscreen (video + transcript visible)
# Install dependencies
python setup.py
# Transcribe + analyze (dry-run)
python main.py input.mp4 --dry-run -v
# Launch interactive editor
python editor_server.py
# Open http://localhost:8765
# Render final video (after editing, or directly)
python main.py input.mp4 -v- Python 3.10+
- FFmpeg (auto-provided by imageio-ffmpeg)
- Internet (first run downloads Whisper model, ~150MB)
MIT License - see LICENSE
Issues and PRs welcome! This is an open-source project built for the WorkBuddy community.