# Repository Briefing: buxuku/SmartSub
> Source: https://repoforai.com/repo/buxuku/SmartSub (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/buxuku/SmartSub
- **Official Docs / Website**: https://smartsub.linxiaodong.com/
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (94/100 · Maintenance 35/35 · Adoption 19/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v3.12.2 (2026-11-05) — https://github.com/buxuku/SmartSub/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Self-Hosted, Local AI, MCP, CLI, GPU
- **Momentum**: 6,257 ★ total (+16 24h / +78 7d) · 514 forks
- **Topics**: `deepseek`, `faster-whisper`, `fireredasr`, `funasr`, `ollama`, `openai`, `qwen3-asr`, `sherpa-onnx`, `subtitle`, `translate`, `whisper`, `whisper-cpp`
- **When to Use**: Best for: Creators, localization teams, and media archives that need repeatable transcription, subtitle review, dubbing, and export on workstations, with optional CLI or MCP orchestration. Skip if: You need a documented multi-tenant server with centralized queues and access controls, or only need one ASR command or a scripted FFmpeg export.

## Overview
```text
### Architecture & Core Mechanics
SmartSub is a TypeScript desktop application built with Electron and Nextron. The tree separates `main/`, `renderer/`, and `automation/`; the package manifest points to `app/background.js`, and the build runs `nextron build --no-pack` before `scripts/build-automation.mjs`. The media workflow accepts local files or downloads via yt-dlp and lux, then composes transcription, translation, editing, dubbing, and FFmpeg export as individual stages or batch jobs.

Transcription is not tied to one runtime. The app bundles whisper.cpp and the sherpa-onnx native library, downloads a self-contained Python runtime for CTranslate2-based faster-whisper, and can invoke a separately installed Whisper-compatible CLI. A headless daemon starts on demand for MCP or CLI calls and shares task state, configuration, and model assets with the desktop app. The built-in assistant can call the same automation tools, while OpenAI-compatible endpoints provide an integration path for model providers.

### Key Capabilities & Differentiators
SmartSub offers eight transcription choices per task: whisper.cpp, faster-whisper, FunASR, Qwen3-ASR, FireRedASR, NVIDIA Parakeet, Whisper CLI, and cloud ASR across nine providers. Translation spans 20 services, including local Ollama and OpenAI-compatible endpoints, with translated-only or bilingual subtitle output. Optional model-assisted correction and semantic line breaking preserve word-level timing and fall back to rule-based segmentation if the AI step fails.

Dubbing pairs local Kokoro or VITS synthesis with optional ZipVoice zero-shot voice cloning and cloud voices. It checks synthesized line duration against the subtitle timeline, can borrow silent gaps, and flags lines that still overrun for manual revision. Outputs include WAV or MP3, replacement or mixed audio, and dual-audio MKV with optional aligned subtitles. The editor previews styled hard subtitles before burn-in; soft-subtitle export uses stream copy to avoid re-encoding video.

### Trade-offs & Limitations
Compared with running whisper.cpp and FFmpeg separately, SmartSub removes much of the glue work between transcription, subtitle review, dubbing, and export. Standalone tools remain simpler for a single scripted stage. The wider engine choice adds operational variables: model size, concurrent tasks, runtime downloads, and driver compatibility all matter. Treat the GPU label as a platform capability, not a guarantee for every engine and model combination. Hard subtitles maximize playback compatibility but require rendering; soft subtitles avoid re-encoding but depend on player support.

Local processing and free online processing are different choices. Bundled free translation endpoints still require a network connection; use a local service such as Ollama if subtitle text must stay on the workstation. Cloud ASR uploads audio to the configured endpoint, and a cloud assistant can receive screenshots or workspace context. Local processing avoids provider usage fees but shifts the compute burden to the workstation. MIT covers the application code, not the separate terms of downloaded models, cloud services, media, or reference voices.

### Hardware & Deployment Guide
Installers target Windows and Linux x64 and macOS arm64 or x64. Download a speech model during onboarding; faster-whisper downloads its self-contained runtime separately. Windows and Linux acceleration packages are available in-app for NVIDIA CUDA and AMD/Intel Vulkan, without manually installing the CUDA Toolkit. Apple Silicon uses Core ML or Metal; Intel Macs are CPU-only. Failed accelerator loading can fall back to CPU. Packaged MCP and CLI commands reuse Electron's Node.js runtime, making headless use part of the desktop installation rather than a separate server deployment.

For source development, use `yarn install` and `yarn dev`; native library downloads can be retried with `yarn native:fetch`. The v3.12.0 release added task resumption from completed stages. v3.12.1 fixed Windows long-path transcription failures affecting FunASR, Qwen3-ASR, FireRedASR, and Parakeet. v3.12.2 added isolated Windows/Linux tests using a short bundled clip to probe Whisper's Vulkan and CPU backends with VAD toggled, so a native crash during the test does not take down the app.
```

## Key Capabilities
```text
- ASR runtimes: Switch per task among bundled whisper.cpp, sherpa-onnx models, downloaded faster-whisper, a system Whisper CLI, and cloud transcription.
- Automation: 111 MCP tools have CLI counterparts; `pipeline.run` supports JSON or stdin, with status polling and deduplication.
- Dubbing alignment: Kokoro and VITS provide local synthesis, ZipVoice provides local zero-shot cloning, and overlong lines are flagged for review.
- Subtitle delivery: FFmpeg can burn styled hard subtitles or mux selectable soft subtitles without re-encoding the video.
- Editorial controls: Assistant edits enter the undo/redo history and are written to the subtitle file only on explicit save.
- Native diagnostics: v3.12.2 adds out-of-process Windows and Linux Whisper tests for Vulkan, CPU, and voice activity detection.
```

## Quick Start / Clone
```bash
brew tap buxuku/tap          # 只需执行一次
brew install --cask smartsub # 安装
brew upgrade --cask smartsub # 升级
```
