~beetle_b/article2podcast

#Introduction

Script to convert an online article into an audio file and add it to a podcast feed. It utilizes Google Cloud to create the audio file.

#Prerequisites

#Setup

You need to have Google Cloud set up. Unfortunately, I don't remember all the steps I did for this. Ultimately you'll need a JSON file that has all your credentials - I believe the Google Cloud's CLI will create it for you on demand.

You also need a place to host your podcast's XML file. It should be accessible via SFTP.

Create an audio directory in the same directory as this script.

You need the following files:

  • texttospeech.json: This has your Google Cloud credentials.
  • config.py: Copy config_example.py and populate it.

#Usage

usage: gcloud-tts.py [-h] [-u URL] [-r] [-s]

Convert an article into an audio entry for a podcast.

options:
  -h, --help         show this help message and exit
  -u URL, --url URL
  -r, --readability  Get text only. No uploading.
  -s, --sftp         Upload to FTP server

For a typical run, it will be:

python gcloud-tts.py -u https://paulgraham.com/hwh.html -s

You do not need to be in the script's directory to run it.

#How It Works

shot-scraper is used to extract the text of the file, which is then sent to Google Cloud to convert into audio. The feed's XML file is updated to point to that file.

About this wiki

commit 6c1077016691607c638227c3187e8982febe5e7c
Author: Mueen Nawaz <none@none.com>
Date:   2024-04-26T13:51:59-07:00

Remove TOC
Clone this wiki
https://git.sr.ht/~beetle_b/article2podcast (read-only)
git@git.sr.ht:~beetle_b/article2podcast (read/write)