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.
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.
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.
An incremental storage system (seen_urls.json) tracks all processed URLs to ensure the same papers or tech news articles are never covered twice.
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."
)
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.
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.
TTS processes 50+ audio clips per episode. The synthesis engine implements exponential backoff to handle quota restrictions and 429 errors seamlessly.
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.
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:
thinking_budget=0 to prevent truncation) to generate a punchy episode title and full 3-4 sentence show notes.feed.xml) from GitHub via REST APIs.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