Skip to Main Content

Adarsh J

Blog to Podcast Agent Convert any blog article into a spoken podcast using AI β€” just paste a URL and get an audio file in seconds.

Team Members
Description

Blog to Podcast Agent

Convert any blog article into a spoken podcast using AI β€” just paste a URL and get an audio file in seconds.


How It Works

  1. You paste a blog URL into the app

  2. An AI agent scrapes and reads the article

  3. Mistral AI summarizes it into a conversational podcast script

  4. gTTS converts the script into spoken audio

  5. You listen or download the mp3


Tech Stack

ToolPurposeAgnoAgent frameworkMistral AILLM for summarizationNewspaper4kWeb article scrapinggTTSText to speechStreamlitWeb UI


Setup

1. Clone the repo

git clone https://github.com/Adars2005/BlogtoPodcast-mistral-.git
cd blog-to-podcast

2. Install dependencies

pip install -r requirements.txt

3. Get your API key

You only need one API key β€” Mistral AI (free, no credit card required):

  1. Go to console.mistral.ai

  2. Sign up and click API Keys in the sidebar

  3. Click Create new key and copy it

4. Run the app

streamlit run app.py

Usage

  1. Open the app in your browser (usually http://localhost:8501)

  2. Paste your Mistral API key in the sidebar

  3. Enter a blog URL in the input field

  4. Click πŸŽ™οΈ Generate Podcast

  5. Listen in the browser or click Download Podcast to save the mp3


Requirements

agno
mistralai
streamlit
newspaper4k
lxml_html_clean
certifi
gtts

URLs That Work Well

Newspaper4k works best with open, public blogs. Use these types of sites:

βœ… Works well:

  • thepythoncode.com

  • learnpython.com/blog

  • thenewstack.io

  • hostinger.com/tutorials

❌ Avoid (blocks scrapers):

  • medium.com β†’ 403 error

  • netflixtechblog.com β†’ SSL issues

  • devops.com β†’ 403 error


Project Structure

blog-to-podcast/
β”‚
β”œβ”€β”€ app.py              # Main Streamlit app
β”œβ”€β”€ requirements.txt    # Python dependencies
└── README.md           # This file

Troubleshooting

ErrorCauseFix401 UnauthorizedWrong API keyGet a fresh key from console.mistral.ai403 ForbiddenSite blocks scrapersTry a different blog URLSSL Certificate ErrorPython SSL issueAlready fixed in code via certifi404 Not FoundArticle deleted/movedTry a different URL


Limitations

  • gTTS requires an internet connection to generate audio

  • Very long articles are trimmed to avoid hitting model limits

  • Some websites actively block automated scraping


Issues & PRs Board
No issues or pull requests added.