Install
openclaw skills install @chentx1243/maple-video2txt将本地视频或音频文件转写为 SRT 字幕文件和 TXT 纯文本文件
openclaw skills install @chentx1243/maple-video2txt将本地视频或音频文件转写为 SRT 字幕文件和 TXT 纯文本文件。
使用场景:
python video_to_text.py --input <视频/音频文件路径>
background: true 参数,避免弹出控制台窗口# 基本用法
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 |
python -m pip install -r requirements.txt<输入文件名>.srt - 带时间戳的字幕文件<输入文件名>.txt - 纯文本文件