Auto Subtitle logo

Auto Subtitle

OrganizationPopular
ZJU-REAL
auto-subtitle

自动字幕 / 语音转字幕:把音频或视频里的语音识别成字幕文件(SRT/ASS/TXT/JSON),可选把字幕烧录进视频。当用户说自动字幕、语音转字幕、视频加字幕、上字幕、转录、听写、字幕文件、生成字幕、烧字幕时使用。

Overview

PublisherZJU-REAL
RepositoryEasel
Skill nameauto-subtitle
Stars
1.2K
Forks
175
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ZJU-REAL on GitHub. Read the source before you install it.

Installation

Install the Auto Subtitle AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ZJU-REAL/Easel.git /tmp/Easel
mkdir -p .claude/skills
cp -r /tmp/Easel/skills/openclaw/auto-subtitle .claude/skills/auto-subtitle
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Auto Subtitle in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Auto Subtitle on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Auto Subtitle is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

自动字幕(语音转字幕)

把音频/视频里的人声识别成字幕。基于共享脚本 skills/shared/scripts/asr.py(faster-whisper 封装), 参数确定、可复现,做中文友好断句。可选把字幕烧录进视频(复用 skills/shared/scripts/video_ops.py / ffmpeg subtitles 滤镜)。

只做"语音 → 字幕文件 (+ 可选烧录)"。通用视频剪辑见 video-editing;纯降噪见 audio-denoise;长视频智能切片+烧字幕见 clipify

输入

字段必填说明
input_file音频或视频文件路径(视频自动提取音轨)
formatsrt(默认)/ ass / txt / json
languageauto(默认)或 zh/en 等 ISO 639-1 码
modeltiny/base(默认)/small/medium/large-v3,越大越准越慢
burn是否把字幕烧录进视频(需视频输入)

支持:mp3/wav/m4a/aac/flac 等音频;mp4/mkv/mov/webm 等视频。

输出

  • 字幕文件放入 outputs/主题名/(SRT/ASS/TXT/JSON)
  • 若烧录:带硬字幕的视频(*-sub.mp4
  • 报告:识别语言、字幕条数、所用模型、输出路径

前置

  • 首次运行会从 HuggingFace 下模型,需外网代理。脚本读取 EASEL_PROXYhttp(s)_proxy 环境变量作代理; 都未设则直连。也可先 export https_proxy=... http_proxy=... 指定。
  • CPU 环境用默认 --device cpu --compute-type int8 即可。

执行步骤

脚本路径(相对项目根):skills/shared/scripts/asr.pyskills/shared/scripts/video_ops.py

1. 生成字幕文件

bash
# 视频 → SRT(自动提取音轨 + 自动检测语言)
python skills/shared/scripts/asr.py transcribe \
  -i input.mp4 -o outputs/主题名/input.srt --language zh

# 视频 → ASS(带样式,**字号/边距按视频横竖屏自适应**):视频输入自动探测宽高
python skills/shared/scripts/asr.py transcribe \
  -i input.mp4 -o outputs/主题名/input.ass --format ass --model small
# 纯音频 → ASS:无法探测尺寸,默认竖屏 1080x1920;横屏加 --res 1920x1080
python skills/shared/scripts/asr.py transcribe \
  -i voice.mp3 -o outputs/主题名/voice.ass --format ass --res 1920x1080
  • ASS 样式按目标视频宽高自适应:字号按短边(min(w,h)*0.05,竖/横屏都≈合适、不再横屏过大), 底边距按高、左右边距按宽,PlayRes=真实宽高。视频输入自动探测;纯音频用 --res 宽x高 指定。 要带样式的硬字幕优先烧这份 ASS(下节),比裸 SRT + 手填 force_style 更省心、且自适应。
  • 中文默认每行 ~18 字,超长自动断行/拆条;--max-line-chars 可调。
  • 不给 -o 时按输入文件名建项目目录,例如 talk.mp4 输出到 outputs/talk/talk.srt;已有项目应显式 -o outputs/主题名/<文件名>.<format>
  • 查看可用模型/语言:python skills/shared/scripts/asr.py info

2.(可选)把字幕烧录进视频

用户要"硬字幕/烧进视频"时,用 ffmpeg 的 subtitles(SRT)或 ass(ASS)滤镜:

bash
# 烧 SRT(可定制样式)
ffmpeg -y -i input.mp4 \
  -vf "subtitles=outputs/主题名/input.srt:force_style='FontName=Noto Sans CJK SC,FontSize=20,PrimaryColour=&H00FFFFFF,OutlineColour=&H80000000,BorderStyle=1,Outline=2'" \
  -c:a copy outputs/主题名/input-sub.mp4

# 烧 ASS(样式已在 ass 文件里,保真)
ffmpeg -y -i input.mp4 \
  -vf "ass=outputs/主题名/input.ass" \
  -c:a copy outputs/主题名/input-sub.mp4
  • 路径含特殊字符时,把 subtitles= 的值用单引号包裹并转义冒号。
  • 需要软字幕(可关闭)而非烧录:ffmpeg -i in.mp4 -i sub.srt -c copy -c:s mov_text out.mp4

3. 产物与报告

  • 字幕文件、烧录视频均写入 outputs/主题名/
  • 向用户报告:识别语言、字幕条数、模型、文件路径;提示可换 --model/--max-line-chars 重跑。

规则

  1. 视频先提取音轨 — 脚本自动用 ffmpeg 提取 16kHz 单声道 wav,不改原视频。
  2. 中文友好断句 — 按标点/长度断行,避免一行过长。
  3. 绝不删原文件 — 只产出新文件到 outputs/
  4. 模型选择 — 求快用 base,求准用 small/medium;CPU 用 int8。
  5. 烧录需视频输入 — 纯音频无法烧录,只出字幕文件。
  6. 无 Profile 依赖 — 转录不需要账号画像。

自研参考

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Auto Subtitle AI skill do?

自动字幕 / 语音转字幕:把音频或视频里的语音识别成字幕文件(SRT/ASS/TXT/JSON),可选把字幕烧录进视频。当用户说自动字幕、语音转字幕、视频加字幕、上字幕、转录、听写、字幕文件、生成字幕、烧字幕时使用。

Why use Auto Subtitle on TypingMind?

Because you install it once and use it with any model. Auto Subtitle is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Auto Subtitle in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ZJU-REAL/Easel/tree/main/skills/openclaw/auto-subtitle. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Auto Subtitle?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Auto Subtitle?

As many as you like. As long as a model supports skills, you can use Auto Subtitle with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Auto Subtitle AI skill free?

Yes. It is published on GitHub by ZJU-REAL under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇