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.
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
You paste a blog URL into the app
An AI agent scrapes and reads the article
Mistral AI summarizes it into a conversational podcast script
gTTS converts the script into spoken audio
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-podcast2. Install dependencies
pip install -r requirements.txt3. Get your API key
You only need one API key β Mistral AI (free, no credit card required):
Go to console.mistral.ai
Sign up and click API Keys in the sidebar
Click Create new key and copy it
4. Run the app
streamlit run app.pyUsage
Open the app in your browser (usually
http://localhost:8501)Paste your Mistral API key in the sidebar
Enter a blog URL in the input field
Click ποΈ Generate Podcast
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.comlearnpython.com/blogthenewstack.iohostinger.com/tutorials
β Avoid (blocks scrapers):
medium.comβ 403 errornetflixtechblog.comβ SSL issuesdevops.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