DALL-E: visualize audio space from the heavans
I’m a slacker and don’t read traditional books. I ingest plenty of articles online day to day though.
I want to listen to Mountaineering: Freedom of the Hills
I want to play this book audibly on my phone while driving. To pull that off my plan was:
- Get the eBook (Amazon Kindle)
- Convert to text (calibre)
- Create mp3 to listen to on my phone (Spotify and maybe OneDrive to get it over there or something)
Converting to Text
I’m unable to get past the DRM.
So I downloaded the epub from https://libgen.rocks/index.php
![Fail] I do not condone illegal activity. You should pay for ebooks.
I did install Clam AV and scanned the file…
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
Convert epub to txt
ebook-convert source.epub out.txt
This created a
1.9 MBtext file with
I manually edited some of the beginning and index. No automated way to do that to with raw text to my knowledge. This brought the file to
1.8 MB and
I spent a little bit of time looking into:
For the sake of time I decided to go the paid route with Amazon Polly.
Unfortunately, Polly only accepts 100K characters at a time. So we need to split up the file:
split -b100000 out.txt
You need the aws cli installed and a bucket for the next steps, swap out the bucket
Upload the text file to S3:
aws s3 cp ./out.txt s3://lkat/audiobooks/freedom-of-the-hills/out.txt
This will cost money
aws polly start-speech-synthesis-task \ --engine `standard` --region `us-east-1` \ --endpoint-url "`https://polly.us-east-1.amazonaws.com/`" \ --output-format mp3 \ --output-s3-bucket-name `lkat` \ --output-s3-key-prefix `audiobooks/freedom-of-the-hills` \ --voice-id Joey \ --text `file://out.txt`
I decided to merge all files
Now that the mp3’s are generated, lets make them available on your phone via Spotify.
I originally thought that I needed Onedrive to sync files, enable local files on mobile, and then point to the files on Onedrive. This is not the way.
On Spotify desktop:
- Enable Show Local Files
- Add the folder with you mp3s with Add a source
- Create a playlist
- Go to your Library and then Local Files, multi-select your mp3s, right click, add to your playlist
On Spotify mobile:
- Click your playlist
- Choose download playlist
Now you have your audio book with Spotify tracking your listen history 🎉
- bash - How to split text files by character count in directory - Unix & Linux Stack Exchange
- Neural TTS - Amazon Polly
- Quotas in Amazon Polly - Amazon Polly
- iterate through files bash - Google Search
- windows - Downloading folders from aws s3, cp or sync? - Stack Overflow
- How to merge MP3 files Linux - Linux Tutorials - Learn Linux Configuration
- Concatenate – FFmpeg
- bash - How to rename with prefix/suffix? - Stack Overflow
- Local files - Spotify
- How to upload local music to Spotify so you can play songs stored on your computer, even when offline
- format conversion - How can I convert .epub files to plain text? - Ask Ubuntu
- Download Books to Your Kindle App - Amazon Customer Service
- How to transfer library Kindle Books via USB
- Digital Rights Management (DRM) — calibre 6.24.0 documentation
- apprenticeharper/DeDRM_tools at v7.2.1
- DeDRM_tools/FAQs.md at master · apprenticeharper/DeDRM_tools
- rupor-github/fb2converter: Unified converter of FB2 files into epub2, kepub, mobi and azw3 formats.
- How to Remove DRM From AZW3 Kindle
- instructions for converting all of your DRM’d Kindle books into a non-DRM format that you can read on any number of devices. | Slade Knowledge Base
- kevinxiong/epub2txt: convert epub file to txt
- golang epub parser - Google Search
- kevinboone/epub2txt2: A simple command-line utility for Linux, for extracting text from EPUB documents.