Automated Content Creation

Autonomous AI Podcast Pipeline

An end-to-end automated system using Python, Gemini, and Windows Task Scheduler to discover tech news, draft two-host conversational scripts, synthesize studio-quality speech, and publish RSS feeds.

Python Gemini TTS (Generate Content) ArXiv & News APIs Cloudflare R2 GitHub Pages (RSS) Task Scheduler (S4U)
01: System Pipeline

Modular Orchestration Flow

The system runs automatically twice a week. In each execution, it processes a series of sequential pipeline stages, storing intermediate checkpoints to handle rate limits and API retries gracefully.

๐Ÿ”
1. Discovery
๐ŸŽฏ
2. Curation
โœ๏ธ
3. Scripting
๐Ÿ—ฃ๏ธ
4. Speech Synthesis
๐ŸŽต
5. Music Mix
๐Ÿ“ก
6. Publish

Idempotency Guards

Each stage stores its output as a JSON checkpoint. If a later stage fails (e.g. hitting network rate limits during TTS), retries resume exactly from the point of failure without repeating heavy API calls.

Seen URL Store

An incremental storage system (seen_urls.json) tracks all processed URLs to ensure the same papers or tech news articles are never covered twice.

02: Discovery & AI Curation

Extracting & filtering tech trends autonomously

Stage 1 dynamically queries the ArXiv API (filtering for Computer Science AI/ML/Robotics categories) and the NewsAPI. Discovered items are checked against the seen store and consolidated.

Stage 2 utilizes Gemini 2.5 Flash to rate the discovered stories on impact, relevance, and interest. Only the highest-scoring papers are curated for the episode.

# Stage 2 Curation Prompt fragment
prompt = (
    "Analyze the following list of newly discovered papers. For each, assign an impact score 1-10 "
    "evaluating its relevance to developers interested in real-world robotics and generative AI. "
    "Provide a 1-sentence reasoning for the score. Return as a clean JSON list."
)
03: Dialog Script Writing

Generating engaging conversational scripts

Using the curated stories list, Gemini 2.5 Flash writes a podcast script featuring two hosts, Alex and Sam. The output script is generated in markdown format, using speaker tags to separate lines.

Sample Dialogue Output: [Alex]: "Welcome back to The Robotics Brief. Sam, have you seen the new procedural driving simulators?"
[Sam]: "Oh absolutely, Alex. Procedural synthesis is saving thousands of hours of manual asset design..."
04: Studio-Quality TTS & Audio Stitches

Leveraging Gemini TTS and FFMpeg

Stage 4 parses the conversational script, breaks it down into individual speaker chunks, and executes high-fidelity speech synthesis using the gemini-2.5-flash-preview-tts API. Alex uses a male voice profile, and Sam uses a female voice profile.

Dynamic Rate Limiting

TTS processes 50+ audio clips per episode. The synthesis engine implements exponential backoff to handle quota restrictions and 429 errors seamlessly.

FFMpeg Stitches & Soundbeds

All chunks are stitched using FFMpeg. The system automatically layers intro/outro musical soundbeds, fading them in and out dynamically based on the audio timestamp.

05: Publishing & RSS Generation

Deploying to Cloudflare R2 and GitHub Pages

Once quality-checked (verifying file size, duration, and minimum script word count), the final MP3 is uploaded to a Cloudflare R2 Bucket (S3 compatible API) via boto3.

The publisher then automatically:

06: Background Infrastructure

Fail-proof Windows Task Scheduler execution

A key operational hurdle was running the heavy pipeline reliably on user environments when the desktop session is locked or logged out. The pipeline script is wrapped in a batch script executed via Windows Task Scheduler with specialized settings:

# Task Scheduler S4U Logon Configuration via PowerShell
$principal = New-ScheduledTaskPrincipal `
    -UserId "LAPTOP-9RM75SJK\manum" `
    -LogonType S4U `
    -RunLevel Limited
Why S4U Logon was critical Unlike 'Interactive' logon types which pause if the PC is locked, S4U (Service For User) utilizes token-based execution. This guarantees the pipeline runs precisely on Wednesdays and Saturdays at 08:00 AM, waking network interfaces and executing using the local Anaconda Python installation.
Project Assets & Live Links ๐ŸŽง Listen to the latest episode  ยท  ๐Ÿ“ก Podcast RSS Feed XML  ยท  ๐ŸŒ Live Web CV

โ† Back to Portfolio