Automation · AI Agents · Case Study

Le Podcast IA: controversial daily topics discovered by AI, produced and published end-to-end

Published · Updated

Every night at 03:00 UTC, discover_daily_topic.py finds the hottest controversial AI story (<48h) via Google Trends, YouTube audience signals and Grok web search — then produce_daily.py turns it into a full episode on @lepodcastia without human intervention.

Le Podcast IA (@lepodcastia on YouTube) is a daily French-language AI news show. The editorial question — « what is the most controversial AI story today? » — is answered automatically every night by `discover_daily_topic.py`. Production, rendering and publication follow in the same cron run. The host can override from the Social Studio; by default, the pipeline runs on its own.

Nightly cron: produce_daily_safe.sh at 03:00 UTC

The daily wrapper `scripts/produce_daily_safe.sh` orchestrates the full chain. Before anything else, it syncs validated code from `origin/main` (`vps_self_update.sh`), cleans up stale NotebookLM notebooks, and frees disk space on old episode artifacts. Then it calls `discover_daily_topic.py` for today's topic. If an episode for the day is already published or recorded in `data/produced.jsonl`, the script exits immediately — idempotent, no duplicate uploads. Otherwise it runs `produce_daily.py` up to three times with automatic recovery (`auto_fix_lepodcastia.py`) on NotebookLM rate limits.

Topic discovery: discover_daily_topic.py

This script is the editorial brain. It is idempotent: if a topic with `discovered_at` = today already exists in `data/topics.json`, it stops. Otherwise it builds a research prompt from four signal layers: **Google Trends** (RSS trending searches for FR, BE and US — scored for AI/tech relevance via `google_trends_signals.py`), **YouTube audience feedback** (comment mining and recurring themes from @lepodcastia via `audience_signals.py`), **editorial pillars** (`config/editorial.json` — priority entities like OpenAI, Anthropic, NVIDIA, Tesla, xAI…) and an **anti-duplicate list** built from `data/produced.jsonl` plus topics already published or produced.

The prompt asks for the most **recent** (<48h, ideally <24h), **controversial** and **passionate** AI story for a francophone audience (Belgium, France, Luxembourg). Selection criteria, in order: freshness, public debate (scandal, regulation, layoffs, model wars), human stakes (jobs, money, security), major entity, query-first YouTube title with tension. Research runs via **Grok** (`grok-4-1-fast` with web search) when `XAI_API_KEY` is set; **Gemini 2.5 Flash** with Google Search is the fallback. The response is strict JSON: title, hook, pillar, format, headline entity, source URL, controversy angle and score, freshness hours, search keywords and Google Trends terms.

The approved topic is appended to `topics.json` with `status: approved`, `auto_discovered: true` and a composite score (controversy + freshness bonus). A Telegram notification is sent when `LEPODCASTIA_TG_TOKEN` is configured. Production auto-runs at 03:00 UTC the same night.

Production: produce_daily.py (script → voice → video → publish)

Once the topic is approved, `produce_daily.py` picks it from the queue (daily ID `dYYYY-MM-DD` or next sequential `tNNN`). A visual variant is sampled from the self-improving bandit (`pick_variant.py`), then `gen_script.py` writes a two-voice dialogue (~16 lines, Alexandra & Michel, NotebookLM podcast style). Voice synthesis uses **NotebookLM web TTS** (`produce_voice.py`) — not edge-tts, not legacy Gemini TTS. Audio is mastered to −14 LUFS, transcribed with Whisper large-v3, captioned with word-level karaoke (rose for Alexandra, blue for Michel), and diarized via SpeechBrain.

Visual production: GPT Image 2 thumbnail (`generate_gpt_thumbnail.py`), then `render_michel_alexandra_plus.py` (Playwright capture of `premium-viz-2026.html`, studio 1920×1080, logo visualizer). A 9:16 Short is built asynchronously (`build_short.py`, Grok Imagine background) and published via Blotato to YouTube account 39714 (@lepodcastia). MP4 hosting: `abbysconsult.space/_media/lepodcastia/<slug>/`. Privacy: public, AI/synthetic flag preserved.

Two self-improving loops

**Topics:** `scoring.py` runs a Beta-Bernoulli bandit on pillar×format arms, fed by YouTube stats (views, CTR, average view duration). Outliers (≥2× channel median) boost the winning arm; underperformers are penalised. A weekly Telegram digest (Monday 08:00 Paris) proposes seven scored topics for manual approve/reject. **Visuals:** `visual_scoring.py` + `pick_variant.py` test thumbnail style, font, colour and layout; Thompson 80/20 sampling picks the next combination per episode.

Social Studio and cross-channel brain

The Social Studio (tiktok.neurolinks.be/dashboard/lepodcastia) lets the host preview, edit and queue scripts from a browser — no terminal required. At 21:25, a cross-channel brain reviews the day's performance, updates hook statistics (ε-greedy bandit over 80+ hook variants), generates topic hints for tomorrow and sends a Telegram digest. Episodes are mirrored to TikTok, Instagram and Facebook with platform-specific formatting.

Token cost vs. Belgian human equivalent

Producing a daily podcast episode with a traditional team: journalist/scriptwriter (3h/episode × 22 days = 66h × €55/hour = €3,630/month), voice artist (22 episodes × €100 = €2,200/month), video editor (2h/episode × 22 = 44h × €40 = €1,760/month). Total: €7,590/month. The AI stack: Grok/Gemini topic discovery ≈ €2/month; Claude Sonnet 4 scripting ≈ €1.50/month; NotebookLM web TTS (22 episodes) ≈ €0 (subscription); FFmpeg + Playwright render on VPS = €0; Blotato Short publishing ≈ €20/month allocated; VPS ≈ €3/month allocated. Total: approximately €27/month. Against the €7,590/month human baseline, the AI stack delivers a 280:1 cost ratio. Annual saving: approximately €90,000 against under €330 in AI spend.

99.6%SAVED

AI infrastructure

27 / month

Human equivalent

7 590 / month

281×cost reduction

Working on a project where these methods apply?