Automated arXiv research paper β conversational podcast pipeline
Podcast-AI is a lightweight automated pipeline that transforms a selected arXiv research paper into a short conversational podcast episode. From paper discovery through RSS distribution (and optionally YouTube upload), every step is driven by a single command or run incrementally step by step.
Fetch β Select β PDF β Chunk Summary β Final Summary β Script β Audio β Video β Release β RSS β Upload
- π Paper Discovery β Fetches latest papers from arXiv by category
- π€ Multi-Provider LLM β Supports OpenRouter, Ollama, GitHub, LM Studio, and Ollama Cloud
- π Smart Summarization β Chunked PDF summarization + final synthesis
- π€ Natural TTS β Conversational script generation with
edge-tts - π¬ Video Assembly β Combines album art + audio into a shareable video
- π‘ RSS & Releases β Generates a podcast RSS feed and GitHub Releases
- βοΈ YouTube Upload β Optional automated upload to YouTube
- π CI/CD Ready β Ships with a GitHub Actions workflow for fully automated runs
| Step | Description |
|---|---|
fetch |
Pull recent papers from arXiv based on configured category |
select |
Choose the best paper via LLM scoring |
pdf |
Download and extract text from the paper PDF |
chunk_summary |
Summarise each chunk of the PDF independently |
final_summary |
Synthesise chunk summaries into a coherent overview |
script |
Generate a conversational podcast script from the summary |
audio |
Produce TTS audio (MP3) for each host using edge-tts |
video |
Assemble video from album art + generated audio |
release |
Prepare release artifacts and update episode history |
rss |
Generate an RSS feed (feed.xml) |
upload |
Upload episode to YouTube (requires credentials) |
clear |
Remove all cached data |
Run the full pipeline with a single command, or execute any step in isolation via --step.
- Python β₯ 3.13
- FFmpeg β required for the
videostep (install guide) - API credentials β for LLM providers and/or YouTube (optional depending on your chosen features)
git clone https://github.com/your-username/Podcast-AI.git
cd Podcast-AI
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txtgit clone https://github.com/your-username/Podcast-AI.git
cd Podcast-AI
uv venv
source .venv/bin/activate
uv syncA
uv.lockis included βuv syncrestores the exact dependency tree.
All runtime settings live in config.json at the repository root. Key sections:
| Section | Purpose |
|---|---|
paper |
arXiv category, fetch count, chunk sizes |
llm |
Default provider, per-provider base URLs & timeouts, step-specific overrides |
script |
Target word count for the generated script |
podcast |
Show name, description, host names |
voice |
TTS voice names, speaking rate, pitch, timeouts |
output |
Paths and base URLs for releases and RSS |
cache |
Cache directory and filenames |
logging |
Log level (DEBUG, INFO, etc.) |
prompts |
Prompt templates used during selection, summarisation, and script generation |
Create a .env file (or export variables) for any API keys your providers require:
| Variable | Required for |
|---|---|
OPENROUTER_API_KEY |
OpenRouter provider |
GH_API_KEY |
GitHub-hosted models |
OLLAMA_API_KEY |
Ollama Cloud provider |
YOUTUBE_CLIENT_ID |
YouTube upload |
YOUTUBE_CLIENT_SECRET |
YouTube upload |
YOUTUBE_REFRESH_TOKEN |
YouTube upload |
python main.pyThis runs every step in order: fetch β select β pdf β chunk_summary β final_summary β script β audio β video β release β rss β upload.
Run any step in isolation:
python main.py --step fetch
python main.py --step select
python main.py --step script
python main.py --step clearAvailable steps: fetch, select, pdf, chunk_summary, final_summary, script, audio, video, release, rss, upload, clear.
Cache files are stored under the directory configured in cache.directory (default: .podcast_cache). To wipe all cached data:
python main.py --step clearThe project includes a modular LLM layer under podcast/llm/. Each provider module implements a common interface:
| Provider | Module | Description |
|---|---|---|
| OpenRouter | openrouter.py |
Routes queries through OpenRouter's multi-model API |
| Ollama | ollama.py |
Local LLM inference via Ollama |
| Ollama Cloud | ollama_cloud.py |
Managed Ollama endpoint |
| GitHub | github.py |
GitHub-hosted models (requires GH_API_KEY) |
| LM Studio | lm_studio.py |
Local LM Studio server |
Select and configure your active provider in config.json under the llm section.
The repository includes a GitHub Actions workflow (.github/workflows/podcast.yml) that fully automates the pipeline:
- Installs system dependencies (FFmpeg) and Python
- Installs Python requirements
- Runs the full pipeline
- Commits updated
episodes.json(if any changes) - Creates a GitHub Release containing the generated MP3 and paper JSON
- Deploys
feed.xmland assets to GitHub Pages
The release step detects CI mode via the GITHUB_ACTIONS=true environment variable (set automatically by GitHub Actions). The release tag is derived from the current UTC date in YYYYMMDD format (e.g. podcast-20250115).
Podcast-AI/
βββ main.py # CLI entry point and pipeline orchestration
βββ config.json # All runtime configuration
βββ episodes.json # Episode history (used by RSS generation)
βββ requirements.txt # pip dependencies
βββ pyproject.toml # Project metadata & uv/pip build config
βββ uv.lock # Locked dependency tree (uv)
βββ assets/
β βββ album_art.png # Podcast cover art
βββ podcast/
β βββ arxiv.py # arXiv paper fetching
β βββ audio.py # TTS audio generation
β βββ cache.py # Atomic cache read/write helpers
β βββ chunk_summary.py # Per-chunk LLM summarisation
β βββ config.py # config.json loading & validation
β βββ episodes.py # episodes.json management
β βββ final_summary.py # Final synthesis of chunk summaries
β βββ log.py # Logging setup
β βββ pdf.py # PDF download & text extraction
β βββ release.py # Artifact preparation & release management
β βββ rss.py # RSS feed generation
β βββ script.py # Conversational script generation
β βββ selection.py # Best-paper selection via LLM
β βββ utils.py # Shared utilities
β βββ video.py # Video assembly (album art + audio)
β βββ youtube.py # YouTube upload
β βββ llm/ # LLM provider modules
β βββ _format.py
β βββ openrouter.py
β βββ ollama.py
β βββ ollama_cloud.py
β βββ github.py
β βββ lm_studio.py
βββ .github/workflows/
βββ podcast.yml # GitHub Actions automation
config.jsonnot found β Ensureconfig.jsonexists at the project root (seeconfig.jsonfor a template).- TTS / audio step fails β The
audiostep requires network access to theedge-ttsendpoint. Check your network and thevoicesettings inconfig.json. - FFmpeg not found β Install FFmpeg via your package manager (
sudo apt install ffmpeg,brew install ffmpeg, or download from ffmpeg.org). - LLM provider errors β Verify that the required environment variable (e.g.
OPENROUTER_API_KEY) is set and that the provider URL is reachable. - YouTube upload fails β Ensure
YOUTUBE_CLIENT_ID,YOUTUBE_CLIENT_SECRET, andYOUTUBE_REFRESH_TOKENare all set correctly.
Contributions are welcome! Please follow these steps:
- Open an issue to discuss your feature or bugfix
- Fork the repository and create a branch
- Make your changes, adding tests where appropriate
- Open a pull request
This project is licensed under the MIT License. See the LICENSE file for details.
