blob: 9b044baa12cc617422237684451bfe694e63c232 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
#Description: This script takes in a URL, saves the URL's to a file, then passes it through firefox's readable'
#Axioms: CONTENTDIR
#Dependencies: https://www.npmjs.com/package/readability-cli https://github.com/coqui-ai/TTS https://packages.debian.org/stretch/festival
webpageLocation=$(mktemp)
wget -O "$webpageLocation" -c "$1"
title=$(/home/"$USER"/.npm-global/bin/readable -q -p "title" "$webpageLocation")
article=$(/home/"$USER"/.npm-global/bin/readable -q -p "text-content" "$webpageLocation"|iconv -c -f utf-8 -t ascii -)
/home/"$USER"/.local/bin/tts --use_cuda true --text "$article" --out_path "/home/$USER/Media/Videos/Content/$title-$(openssl rand -hex 6).wav" || echo "$article" | text2wave > "/home/$USER/Media/Videos/Content/$title-$(openssl rand -hex 6).wav"
rm "$webpageLocation"
|