← ClaudeAtlas

video-to-markdownlisted

把视频里的语音提取并转录成带时间戳的 markdown 逐字稿 + 摘要。本地转录,免费,无需 API key,跨平台:Apple Silicon (macOS) 用 mlx-whisper,Windows / Linux 用 faster-whisper(CTranslate2)。当用户提到「视频转文字 / 转录视频 / 逐字稿 / 会议录像转 md / 把视频里的对话整理成文档」时使用。依赖 ffmpeg(已装)和转录后端(装在 skill 自带的 venv 里,首次自动创建,首次转录会下载约 1.5GB 模型)。
BambooXiu/AgentSmithy · ★ 0 · Data & Documents · score 60
Install: claude install-skill BambooXiu/AgentSmithy
# video-to-markdown 把视频里的语音转录成带时间戳的 markdown 逐字稿,并在顶部生成一段摘要。 ## 何时用 - 用户给了一个视频文件,想把里面的语音转成文字、存成 md - 会议录像 / 讲座 / 访谈 / 课程 -> 逐字稿 - 用户说「把视频转成文字」「转录这个视频」「提取视频音频转 md」 ## 何时不用 - 只想要纯音频文件(不转文字)-> 直接用 ffmpeg,不要用这个 skill - 视频基本无语音(纯音乐 / 无声)-> 转录结果无意义,先提醒用户 ## 依赖 - `ffmpeg`(跨平台。macOS: `brew install ffmpeg`;Windows: `winget install ffmpeg` 或 `choco install ffmpeg`;Linux: apt/dnf) - 转录后端(二选一,脚本自动检测): - **mlx-whisper**:Apple Silicon (macOS),原生快 - **faster-whisper**:Windows / Linux / Intel Mac,CTranslate2 后端 - **注意**:本机常见是 Homebrew Python(externally-managed,PEP 668),不能直接 `pip install` 装系统 Python。本 skill 用自带 venv 隔离,见下方第 1 步。 - **Windows shell 要求**:下方命令为 bash 语法,Windows 需在 **Git Bash** 或 **WSL** 下执行(Claude Code 在 Windows 通常默认用 Git Bash 执行 Bash 工具)。`python3` 若不识别,用 `python` 或 `py -3`。 ## 调用流程 变量: ```bash SKILL_DIR=$HOME/.claude/skills/video-to-markdown VENV=$SKILL_DIR/.venv # 自动定位 venv python(跨平台:Windows 是 Scripts/python.exe,macOS/Linux 是 bin/python) if [ -x "$VENV/Scripts/python.exe" ]; then PY="$VENV/Scripts/python.exe" else PY="$VENV/bin/python" fi ``` ### 1. 确保 venv + 依赖(仅首次需要) ```bash SKILL_DIR=$HOME/.claude/skills/video-to-markdown VENV=$SKILL_DIR/.venv if [ -x "$VENV/Scripts/python.exe" ]; then PY="$VENV/Scripts/python.exe"; else PY="$VENV/bin/python"; fi if [ ! -x "$PY" ]; then (python3 -m venv "$VENV" 2>/dev/null || python -m venv "$VENV") "$PY" -m pip install -U pip --index-url https://pypi.tuna.tsinghua.edu.cn/simple fi # Apple Silicon (M 系列) = Darwin +