Jordan Eldredge

You can now “read” this blog as a podcast

|

TL;DR: You can copy this link into your podcast player to subscribe an text-to-speech version of this blog.


I personally prefer listening to reading. As such, for years I’ve developed personal workflows around bookmarking interesting text content to consume later as audio content. But now that LLM’s have made good text to speech accessible to tinkerers like myself, it occurred to me that others might like to consume my blog’s content in a similar way.

The Listen Button

So, I took it upon myself to automate the task of wiring my blog up to OpenAI’s text-to-speech, API and produce MP3 versions of all of my posts. To start with, each blog post now features an integrated “Listen“ button.

Give it a try on this post!

Podcast

My blog already has an RSS feed, but only die hard nerds still use RSS. However, just about everyone listens to podcasts, and podcasts are just RSS feeds under the hood! So, I forked my RSS feed code to emit a podcasts consisting of these generated audio files. So, if you’d like to follow my blog in your podcast app, just copy this URL into your app:

https://jordaneldredge.com/feed/podcast/

Integrating with existing audio content

As a musician several of my posts already contain audio content. For example some posts embed snippets of me singing or playing ukulele. For these I was able to stitch together the text-to-speech audio and the “real” audio into a single, contiguous Mp3 artifact.

All of this is achieved via a job which parses the markdown of an individual post’s content, chunks into blocks of top level elements which are small enough to be processed by the OpenAI API and then builds up a list of small Mp3s. If an embedded audio file is one of those top level elements, it becomes its own chunk. These chunks are then concatenated together with FFMpeg and uploaded to Cloudflare’s R2.

The code is all on GitHub. Here’s the script that generates the mp3s: audio.ts

Cost

AI APIs can get pretty expensive, so I was pleased to find that it only cost about $15 to convert the 291 posts I’ve written over the last 17 years.