Skip to content
HChenZiPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SubForge

A lightweight, zero-Python offline bilingual subtitle engine & CLI — built for readable segmentation, context-aware translation of technical and long-form videos, and automated media-library batching.

English | 简体中文

Positioning · Download · Quick Start · Key Features · CLI & Agents


Positioning & Scope

SubForge is not an all-in-one AI audio or video dubbing studio. It deliberately narrows its scope to doing one thing well: producing reading-grade bilingual subtitles locally with minimal footprint.

  • Built for: Long-form talks, technical videos, podcasts, and personal media libraries where natural line breaks, accurate domain terminology, bilingual .ass styling, and repeatable batch/CLI automation matter.
  • Intentionally out of scope: Voice cloning, AI dubbing, audiobook synthesis, or bundling a multi-gigabyte Python/PyTorch stack.
  • Composable & permissive: Packaged with Tauri v2, zero third-party npm runtime dependencies, native inference binaries, a standalone --json CLI (subforge-cli), and an MIT license for frictionless personal or commercial integration.

Download

Download the installer for your platform from Releases. Python, CUDA toolkits, and API keys are not required.

Platform Installer Notes
Windows 10 / 11 (64-bit) SubForge_*_x64_en-US.msi / x64-setup.exe .msi is recommended if antivirus software interferes with NSIS temp extraction. Supports NVIDIA, AMD, Intel GPUs and CPU mode.
macOS (Apple Silicon) SubForge_*_aarch64.dmg Drag to Applications. If Gatekeeper prompts on first launch, choose Open Anyway under System Settings -> Privacy & Security. (Intel Mac is currently source-only.)
Linux (64-bit) SubForge_*_amd64.AppImage / .deb Mark .AppImage as executable (chmod +x) or install .deb on Ubuntu/Debian.

Verification status: End-to-end local pipeline runs (FFmpeg audio extraction, CrispASR recognition, segmentation, translation, .srt/.ass/.vtt export, and FFmpeg hard-sub burn-in) have been verified on Windows 11 x64. macOS (Apple Silicon) and Linux (Ubuntu x64) are covered by automated CI standalone-binary smoke tests and live upstream asset checks; please report platform-specific GUI issues via GitHub Issues.


Quick Start

  1. Set up the recommended bundle (first launch only) On first launch, SubForge detects your GPU or CPU and selects a matching starter bundle. Click One-Click Install Recommended Bundle and wait for the download to complete.
  2. Add media files or a video link Drop local video/audio files (or a folder) into the window, or paste a YouTube / Bilibili URL. Select the target language and click Start Subtitling.
  3. Export, review, or burn subtitles Generated .srt files are saved alongside the original video for automatic playback in standard media players. Click Inspect to review or edit lines alongside synced video playback, or click Burn Hard-Sub MP4 to export a hard-subtitled video.

Key Features

  • Zero Python / PyTorch stack. Unlike heavy AI media studios that bundle Python environments and multi-gigabyte PyTorch/CUDA toolchains, SubForge ships as a compact native desktop app and CLI. Whether you run NVIDIA, AMD, Intel GPUs, Apple Silicon, or CPU-only laptops, the built-in manager fetches the matching native inference binaries and weights directly.
  • Context & glossary-aware translation. Translating captions line by line breaks cross-cue sentences and mistranslates polysemous domain terms (e.g. network port → harbor, container image → picture, memory free → "free of charge"). SubForge translates ~20 surrounding lines together with the video's title, description, and customizable glossary, plus optional polish and audit passes.
  • Reading-grade segmentation & deterministic QC. Subtitles are grouped via word-aligned dynamic programming at natural speech pauses and clause boundaries—not dubbing-oriented raw chunks—avoiding rapid micro-flashes or multi-line blocks while keeping URLs, abbreviations, and version numbers intact.
  • Low-VRAM scheduling & multi-format export. ASR and LLM translation alternate on GPU memory with automatic hybrid CPU/GPU offload, allowing 8 GB cards and CPU-only machines to handle long recordings reliably. Supports 10 languages (en, zh-CN, zh-TW, ja, ko, es, fr, de, pt, ru) and exports .srt, two-layer .ass, and .vtt.
  • Headless batching & Agent-ready CLI. Built for automated media libraries (batch --mode missing) and scripting via a standalone subforge-cli with clean --json stdout output.

Hardware Reference

SubForge selects a preset automatically based on detected hardware, which can also be changed manually:

System Spec Preset Description
Laptop / integrated graphics (<= 6 GB VRAM) Fast / Low VRAM Uses compact weights suitable for CPU or entry-level GPUs
8 GB GPU (e.g. RTX 4060, RX 7600) Balanced Balances throughput and translation quality for everyday use
8–16 GB GPU + 32 GB RAM / Apple Silicon Mac Pro Narrative / Pro Tech Distributes larger models across GPU and system memory for higher fluency and domain accuracy
Existing Ollama, LM Studio, or Cloud API External API Connects directly to an external OpenAI-compatible endpoint

FAQ

What if a model download is interrupted or slow?
The built-in downloader supports HTTP range resume; clicking download again continues from the previous byte offset. Users in regions with slow Hugging Face access can enable the mirror option in the interface.

Does closing the app midway through a long video lose progress?
No. Long recordings are split at speech pauses during recognition, and translations are checkpointed after each batch. Re-running the job resumes from the last saved batch.

Where are output files stored?
For local files, subtitles are saved in the same directory as the source media. Videos fetched from URLs are stored under the media folder inside SubForge's data directory and can be opened directly via Inspect.


AI Agent & CLI Integration (subforge-cli)

Every desktop installation includes the standalone subforge-cli executable, sharing the same downloaded models and configuration as the GUI. AI coding and desktop agents (Claude Code, Cursor, Codex, OpenClaw, etc.) can invoke subforge-cli directly or load the bundled skill definition at skills/subforge-cli/SKILL.md.

Pass --json to route progress logs to stderr and emit clean JSON on stdout:

# Inspect hardware, installed models, and setup readiness
subforge-cli doctor --json

# Automatically provision recommended engines and models
subforge-cli setup --preset auto --json

# Subtitle a local video or online URL and return output file paths as JSON
subforge-cli run ./video.mp4 --target-lang zh-CN --ass --json
subforge-cli run "https://www.youtube.com/watch?v=xxxx" --ass --burn --json

# Batch-process a media directory
subforge-cli batch --media-root ./videos --mode missing --json
Running or building from source

Running from source requires Node.js >= 22.0.0 (zero external npm runtime dependencies):

git clone https://github.com/hchenzi/subforge.git
cd subforge
./subforge-cli gui      # On Windows: subforge-cli.cmd gui
npm test

Build the standalone Tauri desktop installer and subforge-cli binary (requires Node.js 22 and Rust):

cd desktop
npm install
npm run build

License

Source code is licensed under MIT. Inference engines and model weights are downloaded directly from their official upstream repositories on demand and remain governed by their respective licenses.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages