How to Build a Podcast Intro Generator A developer has published a walkthrough for building a Podcast Intro Generator that combines Jinja2 script templating with ElevenLabs' text-to-speech API to produce branded episode intros as MP3 files. The pipeline injects podcast name, tagline and episode details into a template, sends the text to ElevenLabs' REST endpoint with configurable stability and similarity-boost voice settings, then post-processes the audio with fades and normalization. Every podcast needs a hook—a short, memorable intro that sets the tone, tells listeners what they’re about to hear, and builds brand consistency. Recording a fresh intro for each episode can be tedious, especially for solo creators juggling editing, publishing, and promotion. With modern voice AI and text‑to‑speech TTS technology, you can automate that process and generate a polished intro in seconds. In this post I’ll walk you through building a Podcast Intro Generator that takes a few lines of script, injects your podcast name, and spits out a high‑quality audio file ready for your editing workflow. The core of the solution relies on ElevenLabs , a state‑of‑the‑art TTS service that offers realistic voice cloning and easy API access. Let’s dive in +-------------------+ +--------------------+ +-------------------+ | User Input | --- | Script Builder | --- | ElevenLabs TTS | | title, tagline | | template + data | | API audio file | +-------------------+ +--------------------+ +-------------------+ | v +-----------------+ | Post‑process | | fade‑in/out, | | normalization | +-----------------+ | v +-----------------+ | Output File | +-----------------+ ElevenLabs provides a free tier that’s generous enough for testing, and a paid plan for high‑volume production. The API uses a simple REST interface and returns audio in MP3 format by default. Quick link: Sign up and grab your API key here → https://try.elevenlabs.io/kr07zfuqn1bp https://try.elevenlabs.io/kr07zfuqn1bp Once you have the key, you can start sending requests. Below is a minimal Python wrapper that handles authentication, voice selection, and audio retrieval. python import requests import json from pathlib import Path ELEVEN API KEY = "YOUR ELEVENLABS API KEY" BASE URL = "https://api.elevenlabs.io/v1" def generate speech text: str, voice id: str = "default", output path: Path = Path "intro.mp3" : """Send a TTS request to ElevenLabs and save the resulting audio.""" url = f"{BASE URL}/text-to-speech/{voice id}" headers = { "xi-api-key": ELEVEN API KEY, "Content-Type": "application/json" } payload = { "text": text, "model id": "eleven monolingual v1", "voice settings": { "stability": 0.75, "similarity boost": 0.85 } } response = requests.post url, headers=headers, json=payload response.raise for status The API returns raw audio bytes output path.write bytes response.content print f"✅ Intro saved to {output path}" Example usage if name == " main ": script = "Welcome to TechTalk, the podcast where we decode the latest in software engineering. Today we explore serverless architectures." generate speech script, voice id="YOUR CLONED VOICE ID" Tip: If you don’t have a cloned voice yet, create one in the ElevenLabs dashboard. Upload a few seconds of your own voice, and the service will generate a voice id you can reuse across episodes. Hard‑coding the script defeats the purpose of a generator. Instead, use Python’s f‑strings or a small templating engine like Jinja2 to inject episode‑specific data. python from jinja2 import Template INTRO TEMPLATE = """ Welcome to {{ podcast name }}, the show that {{ tagline }}. In today's episode, "{{ episode title }}", we'll dive into {{ episode topic }}. Stay tuned """ def build intro podcast name, tagline, episode title, episode topic : tmpl = Template INTRO TEMPLATE.strip return tmpl.render podcast name=podcast name, tagline=tagline, episode title=episode title, episode topic=episode topic Now you can call build intro with data from a CSV, a content management system, or even a simple CLI prompt. script = build intro podcast name="DevBytes", tagline="break down complex dev topics into bite‑size episodes", episode title="Zero‑Trust Security", episode topic="how to implement zero‑trust in cloud-native apps" print script The output will be a ready‑to‑speak string that you feed into generate speech from the previous section. Most podcasts prefer a 0.5‑second fade‑in and fade‑out to smooth the transition. The pydub library makes this trivial. python from pydub import AudioSegment def add fade audio path: Path, fade ms: int = 500 - Path: audio = AudioSegment.from file audio path faded = audio.fade in fade ms .fade out fade ms out path = audio path.with name f"{audio path.stem} faded{audio path.suffix}" faded.export out path, format="mp3" return out path After generating the raw intro: raw path = Path "intro.mp3" faded path = add fade raw path print f"✅ Faded intro saved to {faded path}" Combine the steps into a single function for convenience: python def generate podcast intro data: dict, voice id: str, out dir: Path = Path "." : script = build intro data raw file = out dir / "intro raw.mp3" generate speech script, voice id=voice id, output path=raw file final file = add fade raw file return final file If you like the terminal, here’s a tiny click‑based CLI that ties everything together. python import click from pathlib import Path @click.command @click.option "--podcast", prompt="Podcast name", help="Your podcast's name" @click.option "--tagline", prompt="Tagline", help="A short description of your show" @click.option "--title", prompt="Episode title", help="Current episode's title" @click.option "--topic", prompt="Episode topic", help="What you’ll discuss" @click.option "--voice-id", prompt="ElevenLabs voice ID", help="Your cloned voice" def main podcast, tagline, title, topic, voice id : data = { "podcast name": podcast, "tagline": tagline, "episode title": title, "episode topic": topic, } out file = generate podcast intro data, voice id, out dir=Path "outputs" click.echo f"✅ Your intro is ready: {out file}" if name == " main ": main Run it with: bash $ python generate intro.py You’ll be prompted for the details, and within seconds a polished intro file lands in the outputs/ folder. A subtle music bed can elevate the vibe. Grab a royalty‑free loop e.g., from Free Music Archive and mix it with the spoken intro using pydub’s overlay : php def add music intro path: Path, music path: Path, music volume db: int = -15 - Path: intro = AudioSegment.from file intro path music = AudioSegment.from file music path .apply gain music volume db Loop music if shorter than intro if len music < len intro : repeats = len intro // len music + 1 music = music repeats mixed = intro.overlay music :len intro out path = intro path.with name f"{intro path.stem} with music{intro path.suffix}" mixed.export out path, format="mp3" return out path Now you can call add music faded path, Path "assets/loop.mp3" to produce a final, broadcast‑ready intro. | Tip | Why it matters | |---|---| | Use a consistent voice | Listeners associate a particular timbre with your brand. Clone your own voice once and stick to that voice id . | | Keep scripts under 30 seconds | Longer TTS runs increase latency and can sound less natural. Short intros stay punchy. | | Normalize loudness to -16 LUFS | Most podcast platforms target -16 LUFS; use pydub or ffmpeg to batch‑normalize if you have many episodes. | | Cache generated intros | If you re‑run the same script, store the MP3 locally to avoid unnecessary API calls and save credits . | You now have a complete, end‑to‑end pipeline: All of this can be automated in a CI/CD job, a GitHub Action, or a simple cron script—so each new episode gets a fresh intro without you lifting a finger. If you’re curious about how realistic voice cloning can streamline your podcast production, head over to ElevenLabs and grab your API key: https://try.elevenlabs.io/kr07zfuqn1bp https://try.elevenlabs.io/kr07zfuqn1bp . Plug the key into the snippets above, and you’ll have a custom intro generator up and running in minutes. Happy coding, and may your podcasts always start with a bang