Skip to content

About

Article URL to podcast audio: Tensorlake crawler, Gemini script and ElevenLabs voice, in a Streamlit app.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Article to Podcast Generator with Tensorlake: Turn any article URL into a podcast with Tensorlake, Gemini and ElevenLabs

Article to Podcast Generator with Tensorlake

Turn any article URL into a podcast with Tensorlake, Gemini and ElevenLabs

A Streamlit app that crawls an article URL with a Tensorlake crawler, turns it into a podcast-style script with Gemini, and voices it with ElevenLabs. Download the result as an MP3.


Built by Studio1 Built with Tensorlake

Tensorlake docs  ·  Tensorlake  ·  More examples  ·  studio1hq.com


Overview

This project turns an online article into a podcast. Tensorlake crawls the URL and extracts readable text, Gemini rewrites it as a conversational script, and ElevenLabs reads the script aloud. A Streamlit app runs the full pipeline from URL to audio and lets you play or download the MP3.

Article to Podcast Generator in Streamlit

Features

  • Crawling with Tensorlake: main.py defines a Tensorlake crawler that renders pages in headless Chromium through PyDoll and follows same-domain links up to a depth you choose.
  • Script writing with Gemini: The article text, trimmed to 6,000 characters, becomes a short podcast-style script.
  • Voice with ElevenLabs: The script is converted to speech and saved as MP3.
  • One-click Streamlit app: Enter a URL, set crawl depth (0 to 3), click Generate Podcast Audio, then listen or download.
  • Step-by-step scripts: summarize.py and audio.py run the Gemini and ElevenLabs stages on their own, using saved text files.

Tech stack

Layer Tool
Crawling Tensorlake applications, PyDoll with Chromium
Summarisation Google Gemini (google-genai)
Text to speech ElevenLabs
UI Streamlit

Getting started

Prerequisites

Installation

git clone https://github.com/Studio1HQ/PodcastGenerator.git
cd PodcastGenerator
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

Environment variables

Create a .env file in the project root. You can also enter both keys in the Streamlit sidebar.

Variable Description
GEMINI_API_KEY Google Gemini key, from Google AI Studio.
ELEVENLABS_API_KEY ElevenLabs key, from the ElevenLabs dashboard.

Run

streamlit run app.py

Open http://localhost:8501, then:

  1. Enter an article URL.
  2. Add your API keys in the sidebar, or rely on .env.
  3. Adjust the crawl depth if needed.
  4. Click Generate Podcast Audio.
  5. Listen in the browser or download the MP3.

How it works

  1. Crawl and extract: Tensorlake fetches the article and strips navigation and clutter, returning page text.
  2. Summarise: Gemini turns the text into a conversational script.
  3. Synthesise: ElevenLabs converts the script to audio.
  4. Download: The MP3 plays in the browser and can be saved.
File Description
app.py Streamlit app that runs the whole pipeline from URL to audio.
main.py Tensorlake web crawler and text extraction.
summarize.py Gemini summarisation module.
audio.py ElevenLabs text-to-speech conversion.
.env API keys for Gemini and ElevenLabs.

Resources



Studio1

Built by Studio1, the technical content and DevRel partner for devtool teams. Made with Tensorlake.
Browse more open-source examples at github.com/Studio1HQ.

Website Book a call X LinkedIn

studio1hq.com · Technical content, docs, video and DevRel for devtools

About

Article URL to podcast audio: Tensorlake crawler, Gemini script and ElevenLabs voice, in a Streamlit app.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages