Hacker News new | ask | show | jobs
by anderspitman 2193 days ago
Heh, I just started The Dragon Reborn on my 3rd read-through. I have noticed the chapters aren't right, but it hasn't really bothered me. What does your workflow look like when fixing these? Is there a way to share chapter corrections so others can apply them to their files?
1 comments

I have the corresponding ebooks too, so I open up the whole audiobook as one file and guess where the chapters are from the waveform. I listen to the guess and compare to the ebook, checking whether I am too far or too early. Once I find the correct position (and I got quite good at spotting it from the waveform), I set a marker and start with the next chapter. In the end I split it along the markers.

I was planning on writing something to spot when they say "chapter" as it is always the same but I never got around to that. Also, doing all that work was almost meditative :)

A way to share the corrections would be to export the markers from audacity but sadly I don't have that data anymore, though I could calculate the markers from the files I exported if you are interested.

Well, if you own the epub, you could try to find out the whole length of the audiobook, then extract the whole text of the epub splitted by chapters and then relatively match the text length to the audio length and put the chapters where the nearest silence is (chapter 2 is at 3.3845% of the whole text, so seek for a silence around 3.3845% of the audio length)

I got some pretty good matches with m4b-tool here, while it does not work for all audio books (you need the latest pre-release for this very experimental undocumented feature!):

  # try to match my-book.epub on my-audiobook.m4b
  # ignore first, second and last two epub-chapters for the match (dedication etc.)
  # split chapters into sub chapters to ensure they are between 5 and 15 minutes
  # create a backup of the original chapters (done automatically)
  m4b-tool chapters -v --epub=my-book.epub --epub-ignore-chapters=0,1,-1,-2 --max-chapter-length=300,900 "my-audiobook.m4b"

  # omg it did not work and messed up all chapters, please restore the original chapters
  m4b-tool chapters -v --epub-restore "my-audiobook.m4b"

  # ok, lets only dump the findings in chapter.txt format to do it manually
  m4b-tool chapters -v --epub-dump --epub=my-book.epub my-audiobook.m4b
Yeah that does sound like a lot of work. I appreciate the offer but like I said it hasn't bothered me much. I don't know that I've ever relied on chaptering for audiobooks, other than for breaking the book into smaller pieces to make the scrubbing less sensitive. My mental model is much more of a linear monolith.