Local subtitle extraction tool
Project description
dysub
本地优先的字幕提取工具 — 音视频 → 字幕,全程本地处理。
简介
DySub 是一款完全运行在用户本地的开源字幕提取工具。支持本地音视频文件和抖音分享链接作为输入,在本地完成音频提取、标准化与转写,最终调用用户自备的 ASR API,生成 SRT / VTT / TXT 字幕文件。
🔒 核心原则:所有数据处理均在用户本地完成。开发者不托管任何在线服务,不接触用户的音视频内容,也不经手用户的 API Key。
安装
pip install dysub
前置依赖:
- Python 3.10+
- FFmpeg
快速开始
1. 配置 API Key
推荐阿里百炼(DashScope):
- 打开 阿里百炼控制台
- 进入「API Key 管理」→ 创建新的 API Key
- 写入配置:
mkdir -p ~/.config/dysub
cat > ~/.config/dysub/.env << 'EOF'
DYSUB_ASR_API_KEY=sk-xxxxxxxx
DYSUB_ASR_BASE_URL=https://dashscope.aliyuncs.com/api/v1
DYSUB_DEFAULT_LANGUAGE=zh
DYSUB_DEFAULT_FORMAT=srt
EOF
2. 提取字幕
# 本地视频
dysub process ./video.mp4 --lang zh
# 抖音链接
dysub process "https://v.douyin.com/xxxxx" --lang zh
# 启动 WebUI
dysub webui
# 浏览器访问 http://127.0.0.1:7860
字幕默认输出到 outputs/ 目录。
包含的组件
安装 dysub 会自动安装以下包:
| 包名 | 说明 |
|---|---|
dysub-core |
核心引擎:音频处理、ASR 客户端、字幕合并、CLI |
dysub-input-local |
本地文件输入插件(MP4/MP3/MKV 等) |
dysub-input-douyin |
抖音链接解析插件 |
更多文档
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
dysub-0.1.1-py3-none-any.whl
(2.4 kB
view details)
File details
Details for the file dysub-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dysub-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f8111404e0607c9b5796aa95d87e8b4d241d7cbf0a360c2013aa38a70b6c543
|
|
| MD5 |
b9ff692a32737c6871f51b50103aad95
|
|
| BLAKE2b-256 |
5aa486de1865e03df941b2a0363e3f67f955ab1db749e5bfc1691a96cbbdba96
|