关于 auto-editor-transcribe
auto-editor-transcribe 是用于转录录制音频或实时麦克风输入,并按字幕文本编辑媒体的技能。它提供 Whisper、Parakeet 和 Apple Speech 后端,可导出转录内容或按口述词语筛选区段。
主要功能
- 01转录文件和实时麦克风输入
- 02支持 Whisper、Parakeet 和 Apple Speech
- 03输出文本、SRT 或 JSON
- 04按字幕或词语选择区段
- 05自动读取匹配的字幕旁文件
适用场景
- 01为录制内容生成字幕
- 02实时转录麦克风语音
- 03仅保留包含语音的区段
- 04围绕指定口述词剪辑画面
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ wyattblue/ auto-editor --skill auto-editor-transcribe安装后在 Claude Code 中输入/auto-editor-transcribe确认已加载。
详细介绍
通过语音转录和剪辑
使用 auto-editor 的 whisper.cpp(Whisper 或 NVIDIA Parakeet 模型)或 Apple Speech 后端转录音频。根据字幕内容,使用 --edit subtitle/word 剪辑时间线。
转录 — auto-editor whisper
auto-editor whisper <file|:mic> <model> [options]
将 <model> 设置为 ggml 模型路径。根据所选模型,使用以下三种后端之一:
- Whisper:
ggml-small.en.bin、ggml-medium.en.bin、ggml-large-v3.bin等。 (https://huggingface.co/ggerganov/whisper.cpp)。支持 99 种以上语言、--translate、--prompt。 - Parakeet:文件名中包含 “parakeet” 的任意模型,例如
ggml-parakeet-tdt-0.6b-v3-q8_0.bin(https://huggingface.co/ggml-org/parakeet-GGUF)。 英语准确度相当时,速度比 Whisper 更快;语言会自动检测。不支持--translate、--prompt和--language。 - Apple:特殊模型名称
apple使用 Apple 内置的转录器; 需要 macOS 26 或更高版本。
每个文件仅使用第一个音频流。音频会重采样至 16 kHz,默认将文本输出到 stdout。
auto-editor whisper example.mp4 ggml-medium.en.bin # plain text → stdout
auto-editor whisper example.mp4 ggml-medium.en.bin --format srt -o out.srt
auto-editor whisper example.mp4 ggml-parakeet-tdt-0.6b-v3-q8_0.bin # parakeet backend
auto-editor whisper example.mp4 apple --language en_US # macOS 26+
选项:--format text|srt|json、-o/--output FILE、-l/--language en
(默认自动检测)、-tr/--translate(→ 英语)、-sw/--split-words(每个字幕项一个单词)、--queue SECS(默认 30)、--prompt TEXT、--threads N(默认 4)
以及 -t/--threshold THRES(默认 0.04)。
--split-words 适用于所有后端。Parakeet 的准确度最高。
使用 apple 模型时,请将 --language 设为受支持的语言或区域设置。
Apple Speech 无法自动检测语言,因此 auto 会在发出警告后回退到 en_US。请勿传入 --translate 或 --prompt;两者均不受支持。首次使用某种语言时,可能会下载 Apple 的语音模型,因此需要网络连接。
转录实时麦克风
传入 :mic 代替文件。按 Ctrl-C 可正常停止采集。
auto-editor whisper :mic ggml-medium.en.bin
auto-editor whisper :mic apple --language en_US # macOS 26+
auto-editor whisper :mic ggml-medium.en.bin -o transcript.srt
此操作会将麦克风音频直接流式传输到转录流程,不会保存媒体录音。若要保留并编辑采集的音频,请使用 auto-editor :mic;默认情况下,编辑器和时间线导出会将无损 FLAC 文件 _RECORDING.mka 保存到同一目录。
实时采集支持 macOS、Windows 和 Linux:
- macOS 使用 AVFoundation,优先选择 USB 麦克风,其次使用系统默认设备。
- Windows 使用 DirectShow,优先选择 USB 麦克风,其次使用第一个音频采集设备。
- Linux 使用默认 ALSA 输入设备。
当 -o/--output 的值以 .srt、.json、.txt 或 .text 结尾时,除非显式设置 --format,否则会根据扩展名推断输出格式。
根据语音内容剪辑
--edit subtitle/word 会将匹配字幕行所在的时间标记为活跃(默认保留)。使用现有字幕流,或先转录为 .srt 文件,再将其传入。
| 方法 | 满足以下条件时视为活跃…… | 参数(默认值) |
|---|---|---|
subtitle / regex | pattern(正则表达式)匹配一行字幕 | pattern=""(空值会匹配每一行)、stream=0、ignore-case=#f |
word | value 作为完整单词出现 | 必填 value、stream=0、ignore-case=#t |
subtitle/regex 的 pattern 可选:未提供时,空正则表达式会匹配每一行字幕,因此 --edit subtitle 会保留所有带字幕的片段(即剪掉所有没有语音的部分)。相比之下,word 必须提供 value。
# Keep only sections that have any subtitle (cut the silent gaps between speech)
auto-editor talk.mkv --edit subtitle
# Keep only sections where "introduction" is spoken
auto-editor lecture.mp4 --edit word:introduction
# Regex match (case-insensitive); keep matched lines
auto-editor talk.mkv --edit "subtitle:pattern=(yes|no),ignore-case=#t"
# Cut filler words instead of keeping them: invert with `not`
auto-editor video.mp4 --edit "(not word:um)"
转录 → 剪辑工作流
如果媒体没有字幕流,请生成一个以输入文件命名的伴随文件——对于 talk.mp4,当请求的字幕流未嵌入文件时,auto-editor 会自动加载 talk.srt(然后是 talk.ass):
auto-editor whisper talk.mp4 ggml-medium.en.bin --format srt -o talk.srt
auto-editor talk.mp4 --edit word:question # picks up talk.srt automatically
使用 auto-editor subdump FILE 检查字幕流(仅支持文本字幕;不会导出位图字幕)。
如需了解基于响度/运动检测的剪辑和节奏控制,请参阅 auto-editor 技能。