Podcastfy (Clawdbot)
Generate a podcast-style audio conversation (MP3) from a URL (or multiple URLs) using podcastfy.
This skill provides a wrapper script that:
- - creates/uses a local venv (
{baseDir}/.venv) - installs/updates INLINECODE2
- runs Podcastfy with Gemini for transcript generation and Edge for TTS
One-time setup
1) Ensure ffmpeg is installed on the host.
Ubuntu/Debian:
CODEBLOCK0
2) Provide a Gemini API key:
Set env var GEMINI_API_KEY (recommended), or create a project .env and export it before running.
Example keys file: INLINECODE6
Quick start
Generate an MP3 from a single URL:
CODEBLOCK1
Multiple URLs:
CODEBLOCK2
Long-form:
CODEBLOCK3
Output
The script writes outputs under:
- -
{baseDir}/output/audio/ (MP3) - INLINECODE8 (transcript)
Podcastfy prints the final MP3 path on success.
Optional tuning
- -
PODCASTFY_LLM_MODEL (default: gemini-1.5-flash) - INLINECODE11 (default:
en-US-JennyNeural) - INLINECODE13 (default:
en-US-EricNeural)
Automation / reliability tips (important)
Prefer RSS feeds over browser automation for cron jobs
In isolated cron jobs, avoid relying on a system browser (Chrome/Chromium) or extra Python deps (e.g. bs4).
For TechCrunch categories, prefer the RSS feed:
- - https://techcrunch.com/category/artificial-intelligence/feed/
This reduces breakage from:
- - “No supported browser found …”
- missing site parsing dependencies in the cron runtime
Validate MP3 output (avoid 0-second audio)
We observed podcastfy can occasionally produce an MP3 that is effectively empty/truncated (e.g., a ~261-byte file), which shows up as 0s in Telegram.
This wrapper now validates MP3 output and will automatically fall back to edge-tts synthesis from the latest transcript when the MP3 is invalid.
Safety / workflow
- - Prefer “draft-first”: tell the user what will be generated (language/length) before running.
- Never paste API keys into chat logs.
Podcastfy (Clawdbot)
使用 podcastfy 从单个或多个 URL 生成播客风格的音频对话(MP3 格式)。
该技能提供了一个封装脚本,能够:
- - 创建/使用本地虚拟环境({baseDir}/.venv)
- 安装/更新 podcastfy
- 运行 Podcastfy,使用 Gemini 生成文稿,并使用 Edge 进行文本转语音(TTS)
一次性设置
1) 确保主机已安装 ffmpeg。
Ubuntu/Debian:
bash
sudo apt-get update && sudo apt-get install -y ffmpeg
2) 提供 Gemini API 密钥:
设置环境变量 GEMINIAPIKEY(推荐),或在运行前创建项目 .env 文件并导出。
示例密钥文件:{baseDir}/references/env.example
快速开始
从单个 URL 生成 MP3:
bash
cd {baseDir}
export GEMINIAPIKEY=...
./scripts/podcastfy_generate.py --url https://example.com/article
多个 URL:
bash
cd {baseDir}
./scripts/podcastfy_generate.py --url https://a --url https://b
长格式:
bash
cd {baseDir}
./scripts/podcastfy_generate.py --url https://example.com/long --longform
输出
脚本将输出写入以下目录:
- - {baseDir}/output/audio/(MP3 文件)
- {baseDir}/output/transcripts/(文稿文件)
Podcastfy 在成功时会打印最终的 MP3 文件路径。
可选调优参数
- - PODCASTFYLLMMODEL(默认值:gemini-1.5-flash)
- PODCASTFYEDGEVOICEQ(默认值:en-US-JennyNeural)
- PODCASTFYEDGEVOICEA(默认值:en-US-EricNeural)
自动化/可靠性提示(重要)
对于定时任务,优先使用 RSS 源而非浏览器自动化
在隔离的定时任务环境中,避免依赖系统浏览器(Chrome/Chromium)或额外的 Python 依赖(如 bs4)。
对于 TechCrunch 分类,建议使用 RSS 源:
- - https://techcrunch.com/category/artificial-intelligence/feed/
这可以减少以下问题导致的故障:
- - 未找到支持的浏览器...
- 定时任务运行时缺少站点解析依赖
验证 MP3 输出(避免零秒音频)
我们观察到 podcastfy 偶尔会生成实际上为空或截断的 MP3 文件(例如,约 261 字节的文件),在 Telegram 中显示为 0 秒。
此封装脚本现在会验证 MP3 输出,并在 MP3 无效时自动回退到使用最新文稿通过 edge-tts 合成音频。
安全/工作流程
- - 优先采用草稿先行策略:在运行前告知用户将要生成的内容(语言/长度)。
- 切勿将 API 密钥粘贴到聊天日志中。