跳到正文
DEV Community· Akshay Padmanabha·· 2 小時前AI 評分56

Newsletter to Podcast 用 Python 將電子報和網誌轉成 Podcast RSS feed

Turning newsletters and blogs into a podcast feed with Python!

AI 導讀

開源 Python 工具 Newsletter to Podcast 可將電子報和網誌轉成 Podcast RSS feed,並產生全文朗讀或語音摘要。全文朗讀使用 Edge TTS,毋須 API key;摘要使用 Gemini,需自行提供 API key。

正文

Akshay Padmanabha

Newsletter to Podcast is an open-source Python tool that turns newsletters and blogs into an RSS podcast feed! You can pick the sources, generate audio, and subscribe to the resulting feed in a podcast app that supports custom RSS (I use Castbox).

Listen to an original audio sample here

The project supports full article narration as well as spoken summaries. Full narration uses Edge TTS and needs no API key; summaries use Gemini and require your own key (though the free limit is quite generous)! You can set a maximum episode length and longer full readings split into numbered parts at natural text boundaries.

There’s a prerecorded sample on the demo page, and a simple command in the README that fetches an original sample article and generates fresh audio without an API key. The package can run locally or on a schedule in your own GitHub repository using GitHub Actions!

Deployment

Run it locally with Python 3.12+ or use the included GitHub Actions workflow (recommended, and setup instructions are in the GitHub README). You host the generated MP3s and RSS feed wherever your podcast app can reach them.

Speech generation uses Microsoft’s online Edge TTS service (which is unofficial and can break or be throttled sporadically...) Optional summaries send article text to Gemini to be summarized. GitHub Pages publishing is available, but makes the generated feed and audio public (I use this since it's free hosting)!

AI Involvement

I painstakingly steered AI to help creating this tool! In the application itself, article summaries use AI (Gemini) but are optional. Full narration skips the summarization step and uses text-to-speech directly.

Motivation

I wanted to turn some of my favorite newsletters into podcasts (like Seth’s Blog and A Learning A Day) and couldn’t find a free and simple solution that already existed.

Try it!

The repository includes two ways to get a feel for the project:

  • A bundled, prerecorded demo that needs only Python 3.12+
  • A command that fetches an original sample article and generates fresh audio through the live pipeline without an API key

Code and setup: https://github.com/akspad/newsletter-to-podcast

Audio demo: https://akspad.github.io/newsletter-to-podcast/

Let me know what you think! You can also reach out to me on X (Twitter)

來源:DEV Community · dev.to