Easy Audio Books

Where stuff about fanfiction that doesn't fit into any other category goes. Including Polls, RPGs & Multiple Author Works

Try to make sure that new topics here actually couldn't actually go somewhere else.

Easy Audio Books

Postby Lerris » Sat Jan 23, 2016 9:23 pm

Here is how, though there are probably countless variations:

1) Create your own script to clean up the story, since raw html is not pretty. Here is mine. It likely needs much work, and will only work on linux. Basically, get your story in plain text format.

#!/bin/bash
for i in `seq 37`
do
wget https://www.fanfiction.net/s/<put the number here>/$i
mv $i html
echo $i
echo removing before storytextp and after chap_select
cat html/$i | sed ':loop;/storytextp/{d};N;b loop' | sed -n "/chap_select/q;p" > temp.html
html2text -ascii temp.html > $i.tmp
rm $i.txt
sed ':a;$!N;s/\n/ /g;ta
s/\( \)*/\1/g
s/\([.!?]\) /\1\
/g' $i.tmp | sed 's/[XZ][XZ][XZ]//g' | sed 's/Mr./Mister/g' | sed 's/Mrs./Missus/g' | sed 's/Ms./Miss/g' | sed '/fanfiction.net/d' | sed '/fictionpress.com/d' | sed '/fictionratings.com/d' | sed '/< Prev Next >/d' | sed '/Disclaimer/d' | sed '/NOT IN THE STORY/d' | sed '/Review please/d' | sed '/Your review has been posted/d' | sed '/==/d' > $i.txt
rm $i.tmp
done

2. You have to use windows for this, or at least my every attempt at decent sounding text to speech on linux failed. Oh I got it to technically work, but quality was lacking. The key part is the windows built in api. I'm using a program called TTSReader, which doesn't even need to be installed. A windows 10 VM works well to run it. It can process a set of files at once. You may want to share a folder in some manner with your host linux system, unless of course you run windows natively, in which case you just need to somehow get the story in text format. There are a couple of built in voices and maybe do some clean up, such as replacing Mr. with Mister and so on. I, myself, have been using it to create 128kbps mp3s, which work well and allow one to listen to a story when you might be busy on some other task. These could also be used to listen to your own writing as a final check.
Lerris
Senshi Cadet
Posts: 109
 

Re: Easy Audio Books

Postby Sunshine Temple » Sun Jan 24, 2016 2:50 am

Very interesting.

Never used TTSReader


Also moved the topic to Miscellaneous as C&C seemed like the wrong place.
Sunshine Temple
User avatar
Site Mistress
Posts: 2076
 

Re: Easy Audio Books

Postby Spica75 » Sun Jan 24, 2016 5:39 am

Interesting idea certainly,

These could also be used to listen to your own writing as a final check.


Oh yes, LOTS of writers could really use THAT idea!
Spica75
User avatar
Moon Senshi
Posts: 1961
 

Re: Easy Audio Books

Postby Té Rowan » Sun Jan 24, 2016 6:31 am

You could quite possibly bum out that ‘mv’ by using wget’s ‘-O’ option to spec the output file path/name.
Sei sera-sera tüst… E jag’ kaninka!
Té Rowan
User avatar
Moon Senshi
Posts: 1130
 

Re: Easy Audio Books

Postby Martin Rudat » Tue Apr 19, 2016 4:36 pm

It would probably be most effective (as opposed to the most easy) to parse the HTML, and extract the main text; there's also another option, there exist scripts for producing an epub from fanfiction.net (amongst other websites), which would probably lend itself well to being run through a TTS engine.

One of those things that I'd kind of like to play with is trying to put together more-or-less a radio play, having different voices assigned to the third person (narrator), and each of the various characters.

To do that, though, you'd need to reformulate a story as a script, in order to be able to reliably tell the computer which voice to use to read which words.
Martin Rudat
User avatar
Initiate
Posts: 1
 


Return to Miscellaneous, Polls, RPGs

Who is online

Users browsing this forum: No registered users