[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / siberia / hobby / tech / edu / games / anime / music / draw / AKM ] [ meta / roulette ] [ cytube / wiki / git ] [ GET / ref / marx / booru / zine ]

/tech/ - Technology

"Technology reveals the active relation of man to nature" - Karl Marx
Name
Options
Subject
Comment
Flag
File
Embed
Password (For file deletion.)

Join our Matrix Chat <=> IRC: #leftypol on Rizon


File: 1672538150801.mp4 (838.37 KB, 940x940, leftcom praxis.mp4)

 No.18106

i use text-to-speech to generate audiobooks from large amounts of text. However when I use ebooks as the input there's a lot of shit like line breaks, end-line hyphens, page numbers, citations, headers, footers, and other junk that I don't want in there. Within reason, what's the best way (other than manually doing find and replace with regular expressions) to clean up text before processing it with TTS?

 No.18107

>>18106
On linux you can use ebook-speaker that does skip some of that stuff . It's a command line tool to help visually impaired people. It doesn't have an inbuilt TTS so you have to install one beforehand, like for example espeak or festival.

You can also use pdftotext to turn pdfs into regular text files and then use the utilities sed and awk to remove all the crap you don't want the TTS to read aloud. It's easy to put sed and awk commands into a bash script, so that once you have exactly how you want it, you can apply it to other files.

 No.18108

>>18107
thanks!

 No.18109

>>18107
i use festival already to generate ebooks. sounds like what i need is sed and awk

 No.18129

>>18107
i looked into sed/awk tutorials

I found it easier to just convert PDF to text and then brute force through all the stuff with just find/replace using regular expressions in notepad++

I've already made a couple of audiobooks this way and listened to 1 of them

 No.18130

>>18106
>>18129
maybe upload the audiobooks to youtube or some other video platform?


Unique IPs: 4

[Return][Go to top] [Catalog] | [Home][Post a Reply]
Delete Post [ ]
[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / siberia / hobby / tech / edu / games / anime / music / draw / AKM ] [ meta / roulette ] [ cytube / wiki / git ] [ GET / ref / marx / booru / zine ]