Build an AI Podcast Generator with ElevenLabs: A Cross-Border Team's Playbook
Most "AI podcast" demos stop at the fun part: type a topic, get a robot voice. For a cross-border store, a SaaS with an English-only help center, or a Shopify brand selling into five markets, the interesting question is different — can you ship a localized audio channel every week without hiring a studio in each country?
Yes, and the pipeline is boring in the best way. An LLM writes a structured script, ElevenLabs turns each segment into audio, and ffmpeg stitches the pieces into a publishable MP3. The hard parts are not the API calls; they are the output contract, the per-market voice selection, the QA gate, and the cost ceiling.
This is the practical version of that pipeline, written for teams that ship to multiple locales.

图示:来源页预览图(仅作编辑上下文;版权归属原发布方) · 来源引用:dev.to
What You're Actually Building
A four-stage batch job:
- Script generation — an LLM turns a topic brief plus brand voice rules into segmented, speakable text.
- Synthesis — each segment goes to ElevenLabs with a voice chosen per market and per content type.
- Assembly — segments are concatenated, loudness-normalized, and tagged.
- Publication — the MP3 lands in your podcast host and gets picked up by the RSS feed.
Treat it as a data pipeline with a cache, not as a one-off script. You will regenerate segments constantly — a mispronounced brand name in German, a price that changed, a new promo — and you want that to cost seconds, not a full re-run.
Step 1: Define the Output Contract First
Before touching an API, decide what a finished episode is. Write it down as a schema:
{
"episode_id": "eu-de-2025-w12",
"market": "de-DE",
"voice_id": "…",
"segments": [
{"id": "cold_open", "text": "…", "est_chars": 420},
{"id": "body_1", "text": "…", "est_chars": 1800}
],
"target_lufs": -16,
"duration_target_sec": 420
}
Segment IDs matter more than they look. They let you regenerate one paragraph without re-billing the whole episode, and they give your reviewer a stable handle to comment on ("body_1, second sentence, brand name").
Pick a duration target you can actually sustain. Four to six minutes is a realistic weekly cadence for a store announcement or a product deep-dive. Twenty-minute episodes need research, and research is the part AI does worst.
Step 2: Provision Keys and Pick Voices Per Market
You need an LLM key and an ElevenLabs key, stored in the same secret manager as your other production credentials. Never let a marketing intern paste a key into a Zap.
Then: one voice per market, not one voice for everything. ElevenLabs' multilingual models can speak many languages from a single voice, but a native-sounding voice per locale is what makes a German listener stay. Decide the mapping explicitly and version it:
en-US→ host voice, warm, mid-tempoes-MX→ different voice, not the en-US voice speaking Spanishja-JP→ check pace; Japanese at default speed often feels rushed
If you're cloning a real person (a founder, a store's brand voice), get written consent on file and keep it with the voice ID. This is a legal artifact, not a nicety — EU and UK rules plus ElevenLabs' own terms both care about it, and a departing employee dispute is a terrible way to find out.
Step 3: Prompt the LLM for Speakable Text
The prompt does the heavy lifting. Ask for prose, not bullet points — bullet points read terribly aloud. Constraints that matter:
- Numbers and units spelled out in the target language ("ninety-nine euros", "99 Euro", "99ユーロ") so TTS doesn't guess.
- No markdown, no emoji, no URLs. "Visit example dot com slash deals" is fine;
https://…is mush. - Explicit segment markers so you can split deterministically:
##SEGMENT: body_1##. - A pronunciation list for brand names, passed in as context: "Acme is pronounced ack-mee."
- Locale-native phrasing, not translated English. Ask the model to write in German, not translate into German.
Keep the system prompt in version control next to the script templates. When output quality drifts, you want a diff.
Step 4: Chunk, Hash, and Cache
Split on your segment markers, then enforce a hard character cap per request (ElevenLabs bills and limits by characters). Any segment over the cap gets split on sentence boundaries — never mid-sentence, or you get an audible seam.
Hash each segment's text plus voice ID plus model ID. If the hash exists in your cache, reuse the audio file. On a typical weekly run, 60–80% of segments are unchanged from the previous draft, and caching turns a re-run from minutes into seconds.
key = sha256(text + voice_id + model_id + settings_json)
Step 5: Call ElevenLabs With Deliberate Settings
Synthesize each segment. Two settings worth tuning per content type:
- Stability — higher for product specs and prices (consistent, less expressive), lower for intros and storytelling.
- Similarity / style — depends on whether you're using a cloned voice.
Store the settings JSON alongside the audio file. When a listener complains that episode 41 sounds "off," you can diff settings between episodes.
Handle failures as a queue, not a try/except-and-pray. A 429 or a 5xx should park the segment and retry with backoff; a persistently failing segment should fail the episode loudly rather than ship silence.
Step 6: Assemble and Normalize
Concatenate with ffmpeg, then normalize loudness. Podcast platforms expect roughly -16 LUFS integrated with a true-peak ceiling near -1 dBTP. Skipping this is the single most common reason a generated episode sounds quiet next to real shows.
# concat
printf "file '%s'\n" out/seg_*.mp3 > list.txt
ffmpeg -f concat -safe 0 -i list.txt -c copy raw.mp3
# normalize
ffmpeg -i raw.mp3 -af loudnorm=I=-16:TP=-1.5:LRA=11 \
-ar 44100 -b:a 128k final.mp3
Add a short silencer between segments (200–400ms) so the transitions breathe. Without it, the host jumps between topics like a auctioneer.
Step 7: Run the QA Gate
This is where cross-border teams separate themselves from demo projects. Before publication:
- Pronunciation pass — a native speaker (or a paid reviewer on a marketplace) listens for brand names, prices, and place names. Fifteen minutes per locale.
- Fact pass — every number in the script traced to a source of truth (your price feed, your release notes).
- Disclosure line — a spoken or shown "this episode was produced with AI voice technology," per platform policy and your own brand standards.
- Volume/level check — one listen on phone speakers, since that's where 80% of listeners are.
Automate what you can: transcribe the final MP3 with a speech-to-text model and diff it against the input script. Mismatches flag dropped segments or mangled numbers before a human ever presses play.

图示:HEXOPS 原创配图(受选题启发,非复制原文图片) · 来源引用:dev.to
Step 8: Publish With Proper Metadata
Write ID3 tags (title, artist, episode number, cover art) into the file, then push to your host. Each market gets its own feed — de, es-MX, en — because mixing languages in one feed wrecks recommendations and confuses listeners.
Version your cover art per market too. A/B tests on podcast artwork are cheap and the lift is real.
Step 9: Instrument Cost and Quality
Track three numbers per episode: characters synthesized, segments regenerated, and reviewer minutes. Characters tell you your marginal cost per episode; regeneration rate tells you whether your script prompt is stable; reviewer minutes tell you whether the QA gate is still affordable at 5× the volume.
Set a hard budget ceiling per episode in code. A runaway loop that re-synthesizes a long segment 200 times is a real incident, and it happens to teams that didn't set the ceiling.
The Checklist
Copy this into your runbook.
Setup
- Output schema defined and versioned
- API keys in secret manager, not in docs
- Voice IDs mapped per market, documented
- Voice-clone consent on file (if applicable)
Per episode
- Brief includes market, duration target, and source-of-truth links
- Script prompt includes pronunciation list and locale instruction
- All numbers spell-out-checked in target language
- Segments under character cap, split on sentence boundaries
- Cache hit rate reviewed
- Synthesis settings logged with the audio
- ffmpeg concat + loudnorm to -16 LUFS / -1.5 dBTP
- 200–400ms inter-segment silence
- Native-speaker pronunciation pass
- Transcription diff against source script
- AI disclosure included
- ID3 tags + per-market cover art
- Pushed to the correct locale feed
- Cost and reviewer minutes logged
Quarterly
- Re-listen to an old episode in each market — voices drift, brands evolve
- Re-check platform policies on synthetic voice
- Re-benchmark TTS vendors against your worst-performing locale
Why This Matters Beyond the Demo
The original build is a weekend project: prompt, synthesize, concatenate. The version that survives contact with a real business is the one with a cache, a QA gate, and a cost ceiling. For a cross-border team, that difference is the entire value — you get a localized audio channel in five languages for the price of one freelancer's afternoon, and you get it every week without a studio booking.
Start with one market and four-minute episodes. Add the second locale only after the first one has shipped three episodes on schedule.
Sources
- Voice Developer, "Create an AI Podcast Generator with ElevenLabs" — https://dev.to/voice_developer/create-an-ai-podcast-generator-with-elevenlabs-3e4o
- ElevenLabs documentation (text-to-speech, multilingual models, voice cloning and consent terms) — https://elevenlabs.io/docs
- ffmpeg
loudnormfilter reference — https://ffmpeg.org/ffmpeg-filters.html#loudnorm - Apple Podcasts and Spotify loudness and metadata guidance for podcast feeds



