用途:将视频(yt-dlp 支持的 URL 或本地文件)转为文字稿,并由 Agent 生成树形思维导图式摘要,最终输出可读网页 viewer.html。
主要能力与流程:resolve → download → extract_audio → transcribe → agent_summary → export_html。download 用 yt-dlp 抓取或复制本地文件;extract_audio 用 ffmpeg 提取 16k 单声道 wav;transcribe 用 mlx-whisper 生成 transcript.srt 与 transcript.txt;agent_summary 由 Agent 阅读 transcript.txt 并据此写 summary.txt;export_html 生成 viewer.html 并弹出打开。输出目录为 <out>/<id>/,含 video.<ext>、transcript.srt、transcript.txt、summary.txt、viewer.html。
安装依赖:pip install esflow mlx-whisper;系统二进制 yt-dlp、ffmpeg,macOS 用 brew install yt-dlp ffmpeg,Debian/Ubuntu 用 sudo apt install yt-dlp ffmpeg。
用法:python3 scripts/run.py "<URL 或本地视频路径>";查看已有结果用 python3 scripts/run.py --view <job_dir>。常用参数:--out 输出根目录(默认 ~/Downloads/fetch-what-say)、--view、--no-transcribe、--resume、--dry-run、--schema。高级参数:--height 默认 360、--prefer 默认 size、--merge-format 默认 mp4、--model 默认 mlx-community/whisper-large-v3-turbo、--language 默认 zh。退出码:0 成功、1 运行时错误、2 需 Agent 介入、3 校验错误、4 鉴权错误。
Agent 介入:首跑到 agent_summary 节点会以退出码 2 结束,按提示用 --resume <job_dir> 续跑;Agent 需读取 transcript.txt 并按 Summary Prompt 写入 summary.txt,再续跑生成 viewer.html。调试单节点可用 esflow run scripts/ --node transcribe。
Cookies:优先使用显式 --cookies;未传时按 URL 域名匹配 ~/Downloads/fetch-what-say/cookies/ 下的 .txt(如 bilibili_cookies.txt 仅用于 bilibili.com)。脚本不读浏览器 cookies,也不读环境变量;需登录的网站用浏览器插件 Get cookies.txt LOCALLY 导出 Netscape cookies.txt 放入该目录,文件名需包含域名关键词。
限制:依赖 mlx-whisper,平台支持情况与性能资料暂未提供;摘要质量取决于 Agent 对 Summary Prompt 的执行;其余限制资料未提供。