CoolFace
Apppublic

manez-HF-username/AI-Powered-Blog-Summary-to-Spoken-Audio-Converter

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README
[!CAUTION] Note: The metadata block above is required by Hugging Face Spaces for deployment. I cannot remove this from here because if I do so, the Hugging Face deployment will not work.

๐ŸŽ™๏ธ AI-Powered Blog Summary to Spoken Audio Converter

Turn any blog post into a podcast episode in seconds. Paste a URL, and this app scrapes the content, summarizes it using AI agents, and converts it to natural-sounding speech โ€” all in one click.

๐ŸŒ Hosted on Hugging Face Spaces โ€” accessible directly in your browser with no setup required.


๐Ÿ–ฅ๏ธ Usage

  1. 1.Open the app in your browser at http://localhost:7860 (or via Hugging Face Spaces)
  2. 2.Paste any blog post URL into the Blog URL field
  3. 3.Click Generate Podcast
  4. 4.Wait a few moments while the AI agents scrape, summarize, and narrate the content
  5. 5.Read the generated Blog Summary or listen to the Podcast Audio directly in the browser

https://github.com/user-attachments/assets/2a4b61f7-133e-4123-bcc5-617d077b5a74


๐Ÿ“ Project Structure

โ”œโ”€โ”€ app.py                  # Gradio UI and main application entry point
โ”œโ”€โ”€ blog_summarizer.py      # CrewAI agents, tasks, and crew orchestration
โ”œโ”€โ”€ pyproject.toml          # Project metadata and dependencies
โ”œโ”€โ”€ requirements.txt        # Pip-compatible dependencies (exported from uv)
โ”œโ”€โ”€ Dockerfile              # Container configuration
โ””โ”€โ”€ .env                    # API keys (not committed to version control)

๐Ÿš€ Features

  • โ€”Automated Web Scraping โ€” Uses Firecrawl to extract clean article content from any blog URL, filtering out ads and navigation clutter
  • โ€”Multi-Agent Summarization โ€” A CrewAI pipeline with two specialized agents (a Web Content Researcher and a Content Analyst) that work sequentially to produce high-quality, podcast-ready summaries
  • โ€”Text-to-Speech Conversion โ€” Converts summaries to natural audio using the ElevenLabs API
  • โ€”Simple Web Interface โ€” A clean Gradio UI that requires zero technical knowledge to use
  • โ€”Dockerized โ€” Ships as a Docker container for consistent, reproducible deployment
  • โ€”Deployed on Hugging Face Spaces โ€” No installation needed to try the app

๐Ÿงฑ Architecture

    User Input (URL)
          โ”‚
          โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Gradio Frontend   โ”‚  โ† Web UI on port 7860
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚
          โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Blog Scraper Agent โ”‚  โ† CrewAI Agent + Firecrawl Tool
โ”‚  (Web Researcher)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚  Raw blog content
          โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Summarizer Agent    โ”‚  โ† CrewAI Agent + Gemini 2.5 Flash LLM
โ”‚ (Content Analyst)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚  Podcast-ready summary
          โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   ElevenLabs TTS    โ”‚  โ† Converts text to MP3 audio
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚
          โ–ผ
   Summary + Audio Output

๐Ÿ› ๏ธ Tech Stack

ComponentTechnology
LLMGoogle Gemini 2.5 Flash (via LiteLLM)
Agent FrameworkCrewAI
Web ScrapingFirecrawl
Text-to-SpeechElevenLabs
FrontendGradio
ContainerizationDocker
HostingHugging Face Spaces

๐Ÿ“‹ Prerequisites

  • โ€”Python 3.11
  • โ€”Docker (optional, for containerized deployment)
  • โ€”API keys for:
  • โ€”Google Gemini (GEMINI_API_KEY)
  • โ€”Firecrawl (FIRECRAWL_API_KEY)
  • โ€”ElevenLabs (ELEVENLABS_API_KEY)

โš™๏ธ Setup & Installation

1. Clone the Repository

bash
git clone https://github.com/your-username/AI-Powered-Blog-Summary-to-Spoken-Audio-Converter.git
cd AI-Powered-Blog-Summary-to-Spoken-Audio-Converter

2. Configure Environment Variables

Create a .env file in the project root:

env
GEMINI_API_KEY=your_gemini_api_key
FIRECRAWL_API_KEY=your_firecrawl_api_key
ELEVENLABS_API_KEY=your_elevenlabs_api_key

3. Install Dependencies

Dependencies are managed with uv. To export them to a requirements.txt (e.g. for Hugging Face Spaces or Docker), run the following command in PowerShell:

powershell
uv export --format requirements-txt | Set-Content -Encoding UTF8 requirements.txt

This generates a clean requirements.txt without hash pins, encoded in UTF-8.

Then install with pip:

bash
pip install -r requirements.txt

Or install directly using uv:

bash
pip install uv
uv sync

โ–ถ๏ธ Running the App

Option A: Local

โš ๏ธ Before running locally, update the last line in app.py. Replace: ``python if __name__ == "__main__": demo.launch(server_name="0.0.0.0", server_port=7860, theme="soft") ` with: `python if __name__ == "__main__": demo.launch(theme="soft") ` The servername` and `serverport` settings are intended for Docker/Hugging Face Spaces deployment and are not needed for local use.
bash
python app.py

Then open your browser at http://localhost:7860.

Option B: Docker

bash
# Build the image
docker build -t blog-to-podcast .

# Run the container
docker run -p 7860:7860 --env-file .env blog-to-podcast