--- title: URL To Audio Summary emoji: 🐠 colorFrom: gray colorTo: pink sdk: gradio sdk_version: 5.34.2 app_file: app.py pinned: false license: mit short_description: URL to Audio Summary Agent --- # 🗣️ URL to Audio Summary Agent (LangChain + Hugging Face) This project is an advanced LangChain-powered agent that takes any article/blog URL, summarizes it using a CPU-friendly language model, and generates a spoken audio summary. Designed to run entirely on **CPU**, it's perfect for deploying on **Hugging Face Spaces**. --- ## 🚀 Features - 🌐 Fetches and parses web content from any URL - 🧠 Summarizes long articles using `flan-t5-base` - 🔊 Converts summaries into speech using `espnet/kan-bayashi_ljspeech_vits` - 🖥️ CPU-only — no GPU or API keys required - 🧱 Built using LangChain, Gradio, Transformers --- ## 🛠 Tech Stack - **LangChain**: Document loader, prompt chaining - **Transformers**: `flan-t5-base` for summarization - **ESPnet/VITS**: Natural-sounding voice TTS model - **Gradio**: Easy interface for Hugging Face Spaces --- ## 🧩 Usage 1. Paste any blog or article URL (e.g. from Medium, BBC, etc.) 2. The agent will: - Load and extract article content - Summarize the article intelligently - Convert the summary into audio 3. You get both: - 📄 Text Summary - 🔉 Downloadable Audio Summary (WAV) --- ## 📦 Installation To run locally or on Spaces: ### `requirements.txt` ```txt gradio langchain transformers torch sentencepiece beautifulsoup4 ``` --- ## 💡 SEO Tags `AI article summarizer`, `Text-to-Speech summarizer`, `LangChain agent`, `Hugging Face CPU summarizer`, `URL to audio`, `audio content AI`, `gradio langchain tts` --- ## 🧠 Example Models Used - `google/flan-t5-base` (Summarization) - `espnet/kan-bayashi_ljspeech_vits` (TTS) --- ## 📍 Ideal For - Podcasters turning news into voice - Accessibility tools - EdTech content summarization - Personal AI readers --- ## 🪪 License MIT — fork, remix, and deploy freely. --- ## 🙌 Credits Built using [LangChain](https://www.langchain.com/) and [Hugging Face Transformers](https://huggingface.co/transformers/).