AI字幕工作流 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
AI字幕工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
AI字幕工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:cargo install(推荐) cargo install subforge # 方式二:从源码编译 git clone https://github.com/deusjin/subforge cd subforge cargo build --release # 二进制在 ./target/release/subforge
# 查看帮助 subforge --help # 基本运行 subforge [options] <input> # 详细使用说明请查阅文档 # https://github.com/deusjin/subforge
# subforge 配置说明 # 查看配置选项 subforge --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export SUBFORGE_CONFIG="/path/to/config.yml"
SubForge is a Rust CLI for transcribing, segmenting, translating, evaluating, and muxing or burning subtitles into videos. It is built for people who process videos repeatedly and do not want every project to become a pile of scripts, temporary files, model paths, ffmpeg flags, and manual rework.
video / audio
-> speech recognition
-> subtitle segmentation
-> translation
-> quality estimation
-> hard-burned video / soft subtitle track
<p align="center"> <img src="assets/result.png" alt="SubForge bilingual subtitle output preview" width="900"> </p>
faster-whisper transcription with CPU or CUDA support| Tool | Purpose |
|---|---|
| Rust 1.88+ | Build the subforge binary |
| Python 3.9+ | Run faster-whisper, SaT, SubER, and related sidecars |
| ffmpeg | Extract audio, burn subtitles, and mux subtitle tracks |
Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal # Linux / macOS
Windows PowerShell:
$env:RUSTUP_DIST_SERVER="https://rsproxy.cn"
$env:RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"
winget install --id Rustlang.Rustup --exact --force
rustup set profile minimal
rustup toolchain install stable
rustup default stable
cargo --version
mkdir $env:USERPROFILE\.cargo -Force
@"
[source.crates-io]
replace-with = "rsproxy"
[source.rsproxy]
registry = "sparse+https://rsproxy.cn/index/"
"@ | Set-Content -Encoding UTF8 $env:USERPROFILE\.cargo\config.toml
Install ffmpeg:
sudo apt install ffmpeg # Debian / Ubuntu
sudo dnf install ffmpeg # Fedora
sudo pacman -S ffmpeg # Arch
brew install ffmpeg # macOS
winget install Gyan.FFmpeg # Windows
Install SubForge:
git clone https://github.com/deusjin/subforge.git
cd subforge
cargo install --path .
subforge --version
Install Python-side dependencies:
subforge setup # CPU PyTorch
subforge setup --compute cu124 # CUDA 12.x
subforge setup --compute cu128-nightly # RTX 50 / Blackwell sm_120
subforge setup --force # rebuild the local venv
Create local config:
cp config.toml.example config.toml # Linux / macOS
copy config.toml.example config.toml # Windows cmd
Then verify the environment:
subforge doctor
config.toml is ignored by Git because it may contain API keys.
SubForge currently builds from source. Prebuilt binaries are not published yet.
Process a video end to end:
subforge process video.mp4
Generate translated subtitles without burning them into the video:
subforge translate video.mp4
Batch translate a folder of videos into an output directory:
subforge batch translate videos/ -o out
Use soft subtitle muxing instead of re-encoding the video:
subforge process video.mp4 --synth-mode soft
Generate both a hard-burned video and a soft-subtitle output:
subforge process video.mp4 --synth-mode both
Run each stage manually:
subforge transcribe video.mp4 --asr faster-whisper
subforge subtitle video.srt --translator google
subforge synthesize video.mp4 --subtitle video_translated.srt
Config lookup order:
--config <path>$SUBFORGE_CONFIG./config.toml$XDG_CONFIG_HOME/subforge/config.toml$HOME/.config/subforge/config.tomlCommon options:
| Key | Default | Description |
|---|---|---|
asr | faster-whisper | Speech recognition backend |
whisper_model | small.en | faster-whisper model |
segmenter | sat | Subtitle segmentation algorithm |
translator | bing | Translation backend |
target_language | zh-Hans | Target language |
layout | target-above | Subtitle layout |
thread_num | 3 | Concurrent request count |
batch_size | 7 | LLM subtitle cues per request |
quality_estimation | true | Enable GEMBA-MQM scoring |
refine | true | Retry low-score translations |
synth_mode | empty | hard, soft, or both; empty means hard |
synth_encoder | empty | x264, x265, nvenc, nvenc-hevc, qsv, videotoolbox |
Use:
subforge config show
subforge config get api_key
subforge config set whisper_model medium
subforge config path
subforge config get api_key only prints a redacted prefix.
| Command | Purpose |
|---|---|
transcribe | Audio/video to SRT |
subtitle | SRT to translated SRT |
translate | Transcribe and translate, without video synthesis |
synthesize | Video + SRT to hard-burned or muxed output |
process | Full pipeline: transcribe, translate, synthesize |
batch | Batch translate or process multiple videos |
eval | Subtitle quality evaluation with SubER and text metrics |
setup | Create Python venv and install sidecar dependencies |
doctor | Check ffmpeg, Python packages, CUDA, config, and sidecar sync |
model | List and download faster-whisper models |
gpu | Detect and select the default CUDA GPU |
cache | Show, prune, or clean cache entries |
config | Show, get, set, and locate configuration |
SubForge is engineering-oriented, but several stages are inspired by published subtitle and translation quality work:
The LLM backend uses a staged pipeline:
source SRT
|
+-- terminology extraction
| -> glossary.jsonl
|
+-- batched translation
| -> chained mode or concurrent wave mode
|
+-- GEMBA-MQM quality estimation
|
+-- targeted refinement for low-score cues
|
+-- translation memory
-> memory.jsonl
chained_translation = true gives the best continuity because every batch sees the previous translations before it runs. It is effectively sequential for the main LLM translation stage.
chained_translation = false warms up with three sequential batches and then runs later batches in concurrent waves. It is faster on long videos, while preserving cross-wave context.
chained_translation = true # best continuity
thread_num = 3
batch_size = 7
For faster long-video runs:
chained_translation = false
thread_num = 5
batch_size = 10
batch_size controls how many subtitle cues go into one LLM request. thread_num controls how many requests can run at the same time.
| Symptom | Fix |
|---|---|
cargo not found | Install Rust with rustup, then restart the terminal |
ffmpeg not found | Install ffmpeg with your system package manager |
| Python package missing | Run subforge setup |
| CUDA unavailable | Rebuild the venv with subforge setup --compute cu124 --force |
| RTX 50 / Blackwell unsupported | Use subforge setup --compute cu128-nightly --force |
subforge eval cannot find SubER | Run subforge setup or install subtitle-edit-rate |
| Bing translation fails because curl is missing | Install curl |
| Edited Python sidecar has no effect | Rebuild with cargo install --path . |
For a full local check:
subforge doctor
SubForge 是一个旨在将视频字幕制作转化为可复现 AI Pipeline 的高效工具。它通过集成先进的 AI 技术,实现了从语音识别到翻译、再到字幕合成的全自动化流程,旨在为开发者和视频创作者提供稳定、标准化的字幕生产工作流。
SubForge 提供基于 Rust 开发的 CLI 工具,支持 Linux、macOS 和 Windows。核心功能包括:利用本地 faster-whisper 实现 CPU 或 CUDA 加速的语��转录;通过嵌入式 Python sidecar 实现基于 SaT 的字幕切分;支持 Google、Bing 及 OpenAI 兼容的 LLM 翻译后端;并提供链式翻译(Chained Translation)与波浪并发翻译(Wave-based Concurrent Translation)两种模式,确保长视频翻译的上下文连贯性与效率;同时支持 MAPS 风格的术语提取。
运行 SubForge 需要满足以下环境要求:首先需安装 Rust 1.88+ 版本用于构建 subforge 二进制文件;其次需要 Python 3.9+ 环境以驱动 faster-whisper、SaT、SubER 等 sidecar 组件;最后必须安装 ffmpeg,用于音频提取、字幕烧录(Burn)以及字幕轨道封装(Mux)。
目前 SubForge 主要通过源码构建(Build from source)进行安装,尚未发布预编译的二进制文件。开发者需要配置好 Rust 和 Python 环境后,通过克隆仓库并使用 cargo 进行构建。
SubForge 支持多种命令行操作模式:使用 `subforge process` 可实现从视频到翻译字幕的全流程自动化;使用 `subforge translate` 可仅生成翻译后的字幕而不修改原视频;对于批量任务,可以使用 `subforge batch translate` 处理整个文件夹;此外,通过 `--synth-mode soft` 参数,你可以选择软字幕封装(Muxing)而非重新编码视���,从而在保持画质的同时提升处理速度。
SubForge 的配置遵循特定的优先级顺序:首先检查 `--config` 指定的路径,其次是环境变量 `$SUBFORGE_CONFIG`,随后依次查找当前目录下的 `config.toml` 以及系统标准配置路径(如 `$XDG_CONFIG_HOME` 或 `$HOME/.config`)。用户可以通过配置文件自定义 ASR 后端(如 faster-whisper)及相关的 whisper_model 参数。
SubForge 的 CLI 提供了清晰的指令集:`transcribe` 用于将音视频转录为 SRT 格式;`subtitle` 用于将现有 SRT 进行翻译;`translate` 执行转录与翻译的组合流程但不进行视频合成;`synthesize` 负责将视频与 SRT 合成硬字幕或封装软字幕;而 `process` 则是集成所有步骤的全能流水线命令。
SubForge 的 LLM 质量保障流水线采用了分阶段处理机制:首先从源 SRT 中进行术语提取(Terminology Extraction)生成 glossary.jsonl;随后进入翻译阶段,支持链式或并发波浪模式;接着利用 GEMBA-MQM 进行质量评估;针对低分片段进行定向优化(Targeted Refinement);最后将翻译记忆(Translation Memory)存入 memory.jsonl,实现持续迭代。
在使用过程中如遇到问题,请参考以下解决方案:若提示 `cargo` 未找到,请通过 rustup 安装 Rust 并重启终端;若提示 `ffmpeg` 未找到,请通过系统包管理器安装;若缺少 Python 包,请运行 `subforge setup` 进行初始化;若无法使用 CUDA 加速,请使用 `subforge setup --compute` 重新构建虚拟环境。
高效的AI字幕工作流工具
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,AI字幕工作流 在Agent工作流赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | subforge |
| 原始描述 | 开源AI工作流:Rust CLI for AI subtitle workflows: transcribe, segment, translate, evaluate, an。⭐55 · Rust |
| Topics | AI字幕工作流Rust |
| GitHub | https://github.com/deusjin/subforge |
| License | MIT |
| 语言 | Rust |
收录时间:2026-06-01 · 更新时间:2026-06-01 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端