video2txt 技能
name: video2txt
by chentx1243 · published 2026-03-22
$ claw add gh:chentx1243/chentx1243-maple-video2txt---
name: video2txt
description: 将本地视频或音频文件转写为 SRT 字幕文件和 TXT 纯文本文件
metadata: { "openclaw": { "emoji": "video", "requires": { "bins": ["python3"] } } }
---
# video2txt 技能
描述
将本地视频或音频文件转写为 SRT 字幕文件和 TXT 纯文本文件。
功能
使用场景:
1. 需要读取视频内容或理解视频时
使用方法
基本命令
python video_to_text.py --input <视频/音频文件路径>注意事项
示例
# 基本用法
python video_to_text.py --input "D:\videos\meeting.mp4"
# 指定输出目录
python video_to_text.py --input "D:\videos\meeting.mp4" --output-dir "D:\captions"
# 指定输出路径
python video_to_text.py --input "D:\videos\meeting.mp4" --output-path "D:\captions\meeting_result"
# 指定语言和模型
python video_to_text.py --input "D:\videos\meeting.mp4" --language zh --model-size small参数说明
| 参数 | 说明 | 默认值 |
|------|------|--------|
| `--input` | 输入文件路径(必需) | - |
| `--output-dir` | 输出目录 | 输入文件目录 |
| `--output-path` | 输出文件基础路径 | - |
| `--model-dir` | 模型下载目录 | 当前目录/models |
| `--model-size` | Whisper 模型大小 | base |
| `--language` | 识别语言 (auto/zh/en) | zh |
| `--device` | 推理设备 (cpu/cuda) | cpu |
| `--compute-type` | 计算类型 | int8 |
| `--beam-size` | 解码束大小 (1-5) | 2 |
| `--no-vad-filter` | 禁用 VAD 过滤 | false |
依赖
安装
1. 确保 Python 3.11 或 3.12 环境
2. 安装依赖:`python -m pip install -r requirements.txt`
3. 首次运行会自动下载 Whisper 模型到 models 目录
输出文件
注意事项
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...