Some Context
I recently developed a solution to turn old books into a podcast π. I had the idea of adapting this for transforming my text blog into an audio blog π¦». Because I donβt have a decent microphone in order to use my own voice π. And because we live in the future π.
Anyway, it seems that one of the blogging platforms Iβm currently using, is already offering a similar feature. I listened to some examples and it sounds great ππ½, I wanted to try it on my own blog!
But itβs still experimental and you can only use it if youβre an Ambassador π€·πΌββοΈ. In addition to that, I wanted to be able to fully customize the audio output and play with it a bit, so the way to go was clear: Hacking Time π©π»βπ»!
What I needed
- A way of getting all my articles from Hasnode into my task π
- An adaptation of my text-to-voice task β
- A way of getting the voice file into anchor.fm, my podcast platform of choice π§
How it went
I believe Hasnode already offers an API that lets you get your posts quite conveniently, but I was more interested in its backup feature. You see, if you create a github repository and give permissions to Hashnode, it will download your posts in .md format after every new creation or edition. It's quite easy to configure βΊ! You only need to go to your blog dashboard and select βbackupβ.
I decided to create my new tasks in an independent repository for security reasons γ
I found a github repository, made by an Italian organization named Schrodinger-Hat π±βπ», for converting a youtube video into an audio file and uploading it to anchor.fm. The upload task used puppeteer for that and I thought it was quite cool and simple, so I just forked it π. They are great, check them out!
Lessons learned or pending to learn
This project wouldn't be possible without three wonderful open-source projects: the node-gtts library, the fluent-ffmpeg library and the youtube-to-anchorfm repository. I have known for years how wonderful our software development global community is, so Iβm impressed, but not surprised π₯°.
The fruits of hard work
As I said at the beginning, you can already check the audio version of this post in anchor.fm. And one great feature of anchor.fm is that it distributes it to other platforms too: Spotify (which makes sense, as the same company owns both), Google Podcasts, Pocket Castsβ¦ so convenient ππ».
And of course, this repository is available on github.
Is there a future for this project?
Iβm still developing some features related to the voice file generation: using sounds as substitutes for emojis πΆ, adding all the links inside the blog post text into the audio post description π...
The original repository I forked contains code for creating a Github action to execute the download and upload task. When I finish adding the rest of the features I mentioned, it would be nice to have it all automated and just need to access GitHub to publish a new audio post β.
And the best thing is that this project can be easily adapted to work with different blogging and podcast platforms π!
So yeah, its future looks just bright β¨.
Top comments (0)