manez-HF-username/AI-Powered-Blog-Summary-to-Spoken-Audio-Converter
0
[!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
- Open the app in your browser at
http://localhost:7860(or via Hugging Face Spaces) - Paste any blog post URL into the Blog URL field
- Click Generate Podcast
- Wait a few moments while the AI agents scrape, summarize, and narrate the content
- 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
๐ 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
git clone https://github.com/your-username/AI-Powered-Blog-Summary-to-Spoken-Audio-Converter.git
cd AI-Powered-Blog-Summary-to-Spoken-Audio-Converter2. Configure Environment Variables
Create a .env file in the project root:
GEMINI_API_KEY=your_gemini_api_key
FIRECRAWL_API_KEY=your_firecrawl_api_key
ELEVENLABS_API_KEY=your_elevenlabs_api_key3. 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:
uv export --format requirements-txt | Set-Content -Encoding UTF8 requirements.txtThis generates a clean requirements.txt without hash pins, encoded in UTF-8.
Then install with pip:
pip install -r requirements.txtOr install directly using uv:
pip install uv
uv syncโถ๏ธ Running the App
Option A: Local
โ ๏ธ Before running locally, update the last line inapp.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")`Theservername` and `serverport` settings are intended for Docker/Hugging Face Spaces deployment and are not needed for local use.
python app.pyThen open your browser at http://localhost:7860.
Option B: Docker
# Build the image
docker build -t blog-to-podcast .
# Run the container
docker run -p 7860:7860 --env-file .env blog-to-podcast
