Digitally Adrift

My listen later pipeline

Cory over at coryd.dev recently had a post about how they've set up a pipeline to move saved RSS articles to an audio feed. I have a setup with similar functionality but a different pipeline.

Cory's Version

To vastly oversimplify his pipeline it's save item to Linkding -> process with Piper to convert text-to-speech -> save audio file to Audiobookshelf where they can listen to the files and an automated process to remove items marked as completed/listened.

My Version

Lectern

I have a custom web app I call Lectern that I've built that manages RSS feeds, Email newsletters and save-for-later. It is a full PWA so I'm able to install it as an app on my Android and iOS devices and able to host it on a small Linode VPS. That server runs YunoHost which makes it easy to deploy a lot of self hosted apps and get some things implemented easily and by default like security and nginx reverse proxying which makes things a bit easier to manage on my side. Rather than rewriting RSS and bookmarking/save-for-later functionality I'm using Miniflux for RSS feeds and Readdeck for save-for-later. Both are light weight and have solid APIs available. So my app is able to fetch and manage items in both of those apps and pull it into a dashboard I've created.

Each item in the app, no matter the source, has an option to "Listen" or "Add to Podcast" option. Listen will start TTS locally and allows you to queue articles. Add to Podcast will convert TTS and add it to a custom podcast feed that I have subscribed to in PocketCasts.

listen later options

The TTS Pipeline

Now for how the TTS works. When selecting on of the TTS options the text of the article is sent to either a self hosted instance of Kokoro or to ElevenLabs (where I have a very limited free account). I strip out any raw URLs and if available replace them with their link text so I don't get a full URL read back to me. That's the current extent of cleanup I do but there is probably room for some other things I could take care of to make the audio versions a bit cleaner.

Text-to-Speech options

The response from either option is an mp3 file that gets saved and is able to play back on the site or through the podcast feed. The mp3 files are deleted after they are marked as completed when listening from the app. I don't get that signal from the podcast feed so that is definitely something to think about migrating to another self hosted option to handle better.

Downsides

Currently, without paying for Elevenlabs, I'm limited to only a few, normal sized articles before I run out for the month. On the Kokoro side, since I'm hosting it alongside the webapp and it's on a small virtual server it is too slow to process anything longer than a couple minutes without everything timing out or the process going OOM and crashing. I will have to take a look at Piper and see if that is more performant on lower tier hardware. Another thing I've been considering is migrating from Linode to an older PC I have at my home. I initially used Linode because I was worried about how to manage opening firewall ports and keeping my home network secure. But I found that Cloudflare has a solution for this called Tunnels which create a secure connection. The downside to it is I think I would have to move my domains to Cloudflare so we'll see.


So that's about it. It's a similar functionality but not quite nearly as refined as Cory's. I will definitely be using the blog piece to try to improve the quality of my process. Thanks Cory!

Or

Reply by email

⬅ Previous post
Backing up my blog