DALL-E: visualize audio space from the heavans

Issue

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

Goal

I want to play this book audibly on my phone while driving. To pull that off my plan was:

  1. Get the eBook (Amazon Kindle)
  2. Convert to text (calibre)
  3. 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…

Install Calibre

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 MB text file with 1,924,541 characters

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 1,811,393 characters.

Creating Audio

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 lkat

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`

File Management

I decided to merge all files

Mobile Play

Original Plan

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.

Better Way

This article

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 🎉

Already did:

Thought Stream