项目简介
批量为视频生成字幕,并可将字幕翻译成其它语言。这是在之前的一个开源项目 VideoSubtitleGenerator 的基础上,制作成的一个客户端工具,以方便更多朋友们的使用。
💥特性
它保留了之前 VideoSubtitleGenerator 这个命令行工具的全部特性,并新增了以下功能:
-
图形用户界面,操作更加便捷
-
源语言字幕文件和目标语言字幕文件放在视频同目录下,方便播放时任意挂载字幕文件
-
批量处理视频/音频/字幕文件
-
支持视频/音频生成字幕
-
支持对生成的字幕,或者导入的字幕进行翻译
-
支持多种翻译服务:
-
火山引擎翻译
-
百度翻译
-
DeepLX 翻译 (批量翻译容易存在被限流的情况)
-
本地模型 Ollama 翻译
-
支持 OpenAI 风格 API 翻译,如 DeepSpeed 等
-
自定义字幕文件名,方便兼容不同的播放器挂载字幕识别
-
自定义翻译后的字幕文件内容,支持纯翻译结果或原字幕+翻译结果
-
项目集成
whisper.cpp
,对 Apple Silicon 进行了优化,有较快的生成速度 -
项目集成了
fluent-ffmpeg
,无须单独安装ffmpeg
-
支持运行本地安装的
whisper
命令 -
支持选择模型下载源(国内镜像源或官方源)
-
支持自定义并发任务数量
翻译服务
本项目支持多种翻译服务,包括百度翻译、火山引擎翻译、DeepLX、Ollama 本地模型以及 OpenAI 风格的 API。使用这些服务需要相应的 API 密钥或配置。
对于百度翻译、火山引擎等服务的 API 申请方法,可以参考 https://bobtranslate.com/service/ ,感谢 Bob 这款优秀的软件提供的信息。
🔦使用 (普通用户)
-
前往 release 页面根据自己的操作系统下载安装包
-
安装并运行程序
-
在程序中配置所需的翻译服务
-
选择要处理的视频文件或字幕文件
-
设置相关参数(如源语言、目标语言、模型等)
-
开始处理任务
🔦使用 (开发用户)
1️⃣ 克隆本项目到本地
git clone https://github.com/buxuku/video-subtitle-master.git
2️⃣ 在项目中执行 yarn install
或者 npm install
cd video-subtitle-master
yarn install
3️⃣ 依赖包安装好之后,执行 yarn start
或者 npm start
启动项目
yarn start
Manually Downloading and Importing Models
Due to the large size of model files, downloading them through the software may be challenging. You can manually download models and import them into the application. Here are two links for downloading models:
-
Domestic mirror (faster download speeds): https://hf-mirror.com/ggerganov/whisper.cpp/tree/main
-
Hugging Face official source: https://huggingface.co/ggerganov/whisper.cpp/tree/main
After downloading, you can import the model files into the application using the “Import Model” feature on the “Model Management” page.
Import steps:
-
On the “Model Management” page, click the “Import Model” button.
-
In the file selector that appears, choose your downloaded model file.
-
After confirming the import, the model will be added to your list of installed models.
项目链接
https://github.com/buxuku/video-subtitle-master
扫码加入技术交流群,备注「开发语言-城市-昵称」
(文:GitHubStore)