MCPcopy Index your code
hub / github.com/byteroycai/subgen

github.com/byteroycai/subgen @v0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.0 ↗ · + Follow
14 symbols 28 edges 8 files 1 documented · 7%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

该项目以学习和兴趣为主,不保证生产可用性。

SubGen - 视频字幕提取工具

SubGen 是一款跨平台桌面应用,基于 Tauri + Rust 开发,内置 FFmpegWhisper.cpp,实现了 视频一键生成字幕 的功能。


✨ 功能特性

  • 一键生成字幕:支持常见视频格式(mp4, mov, mkv)。
  • 内置 FFmpeg:无需额外安装 FFmpeg,自动完成音频提取。
  • 内置 Whisper.cpp:高效离线语音识别,生成标准 SRT 字幕文件
  • 支持多语言:可指定识别语言,如中文(-l zh)。
  • 跨平台支持:Windows / macOS。

📦 技术栈

  • Tauri:轻量跨平台桌面应用。
  • FFmpeg:音频提取。
  • Whisper.cpp:语音识别引擎。
  • Rust:核心逻辑封装。

🛠️ 安装与运行

1. 克隆项目

git clone https://github.com/byteroycai/subgen.git
cd subgen

2. 安装依赖

pnpm install  # 或 npm/yarn

3. 开发模式运行

pnpm tauri dev

4. 构建打包

pnpm tauri build

构建后,可在 src-tauri/target/release 中找到可执行文件。

🚀 使用方法

  1. 打开应用,选择一个视频文件。
  2. 点击 “提取字幕”,应用会自动:
    • 使用 FFmpeg 抽取音频。
    • 调用 Whisper.cpp 进行语音识别。
    • 生成 xxx.srt 字幕文件。

⚡ 常见问题

1. whisper 模型有内置么?

没有内置模型,如果模型不存在会自动下载,当然你可以自己下载好,放到指定目录即可。

mac:
/Users/{用户名}/Library/Application Support/com.shenqiong.SubGen/models

windows:
C:\Users\{用户名}\AppData\Roaming\shenqiong\SubGen\data\models

模型下载地址:https://huggingface.co/ggerganov/whisper.cpp/tree/main

2. Mac 安装提示 「已损坏,无法打开。 您应该将它移到废纸篓」

sudo xattr -d com.apple.quarantine /Applications/subgen.app

📜 License

MIT License

Core symbols most depended-on inside this repo

binary_path
called by 2
src-tauri/src/commands.rs
run
called by 1
src-tauri/src/lib.rs
whisper_model_url
called by 1
src-tauri/src/commands.rs
model_file_path
called by 1
src-tauri/src/commands.rs
ensure_model_exists
called by 1
src-tauri/src/commands.rs
remove_extension
called by 1
src-tauri/src/commands.rs
App
called by 0
src/App.tsx
handleSelectVideo
called by 0
src/App.tsx

Shape

Function 14

Languages

Rust79%
TypeScript21%

Modules by API surface

src-tauri/src/commands.rs7 symbols
src/App.tsx3 symbols
src-tauri/src/lib.rs2 symbols
src-tauri/src/main.rs1 symbols
src-tauri/build.rs1 symbols

For agents

$ claude mcp add subgen \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact